• Hi,

    I removed a large number of 301 redirects that were put added to the websites .htaccess file during a website migration. After removing them from that file, the redirects were still in place. I searched high and low and eventually found them in the wp_options table, redirects column. I tried saving the permalink settings, but saw no change. What is the best way to get rid of these redirects? I would like to avoid trying to remove them manually.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, @bottlecapnapkin

    There are a few different options you can try to remove the redirects from the wp_options table. To ensure the safety of your website, it is best to back up your website before attempting any of these methods.

    You can use a plugin such as Better Search Replace or Search and Replace to search for and replace the redirect URLs with their correct counterparts. Alternatively, you can use a plugin such as Redirection to manage and delete the redirects within the WordPress dashboard.

    If you are comfortable accessing the wp_options table directly through phpMyAdmin or a similar tool, you can manually delete the redirect URLs from the redirects column.

    Finally, if you have any caching plugins installed, you can try to clear the cache on your website, as it might be caching the redirects.
    Thank you.

    Follow these steps maybe help you fixing the problem.

    1. Check?siteurl?&?home?values of?wp_options?table (wp_ – table prefix may be different). You can use?phpMyAdmin?(if it is installed on your server) or?Adminer.

    2. Check?wp_posts?table. If a malicious script exists – use the SQL command:It removes all malicious scripts from the entire?wp_posts?table

    3. Then, we recommend you to use search and check tables for malicious URL again

    4. And on top of that, search and check all scripts in your database.

    5. After database cleanup, we recommend you to change passwords for all administrators and also remove the administrators generated by malware

    Thread Starter bottlecapnapkin

    (@bottlecapnapkin)

    Thanks for the responses. Sorry I misspoke. The column I am referring to in the wp_options table is actually named rewrite_rules, not redirects. I’ve found recommendations to save permalinks in the settings, and to delete the content of the option_value field of the rewrite_rules column in the wp_options table. I’ve done both multiple times and the rewrite_rules data repopulates. I even set auto_load to no, and still the same issue. Again, these don’t exist any longer in the .htaccess file, and I am not using a caching or redirect plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove redirects from wp_options table’ is closed to new replies.