Why have my custom post type searches stopped working after changing URLs / updating WordPress?

It’s possible that, after moving the site, you hadn’t updated WordPress’ understanding of where the site is located. You might want to try adding the following to your wp-config.php file:

define('WP_SITEURL', 'http://www.seriouslyfish.com');
define('WP_HOME', 'http://www.seriouslyfish.com');

This will override the settings in the database. WordPress uses the location settings to direct rewrite traffic, so this might solve the problem. I’m guessing this because you say that things were working properly before you moved the site.

Maybe it would make sense to try re-checking your .htaccess file as well? Maybe something there is redirecting improperly?

It might be a good idea as well to check the action URL on the form. Is that being generated by the a plugin, WordPress proper, or by something else? If it’s under your control and can be re-written somehow, maybe you don’t need the manual redirection being used in the answer you link to at the top of your question?

Sorry if I’m grasping at straws here, but it’s difficult to debug this without being able to poke the code and see what’s going on.

Leave a Comment