Back to knowledgebase

Reset WordPress Permalinks in the Database

If you cannot access the WordPress dashboard, you can reset the site’s permalink structure from the database.

This can help if a permalink change has caused page errors or broken links across the site.

Before editing the database, take a backup if possible.

To reset permalinks:

  1. Log in to the 4UHosting client area at https://clients.4uhosting.co.uk.
  2. Choose My Services.
  3. Find the hosting service and select Manage.
  4. Select Login to cPanel from the left side.
  5. Open phpMyAdmin.
  6. Select the database used by the WordPress site.
  7. Open the table ending in _options.
  8. Find the row named permalink_structure.
  9. Edit the row and clear the option_value field.
  10. Save the change.

The table prefix may not always be wp_, so the options table may have a different name, such as abc_options.

After the site is accessible again, log in to WordPress and go to Settings > Permalinks. Choose the permalink structure you want and save the settings.