Site URL not matching database- fix not saving?
-
I have recently taken over Website admin duties for my company and we’ve decided a website revamp is in order. I’m currently trying to set up a staging site wtih the WP Stagecoach plugin, but when I go into the plugin I receive the following error message:
`WordPress is using a different “Site URL” than what is stored in the database.
Your site is using: https://www.mainwebsite.com
Your database has: https://incorrecturl.comUnfortunately, this makes it impossible for WP Stagecoach to create your staging site.
The most common cause of this is that the WP_SITEURL and the WP_HOME variables are hard-coded into your site’s wp-config.php file.
Please check in your wp-config.php file and see if you have lines like this:
define(‘WP_HOME’,’https://www.mainwebsite.com’);
define(‘WP_SITEURL’,’https://www.mainwebsite.com’);
If you see these, you will need to update your database so that it reflects the current SiteURL before you can use WP Stagecoach.`The incorrect website is actually a url that was used by a freelancer we hired a few years ago to help us with the last website revamp. The Options page has the correct URL, so I opened up the wp-config file using FileZilla and while the incorrect url was not present, I did notice that the WP_SITEURL had ‘WP_HOME’ instead of a url after it, so I updated that thinking it was causing the problem.
After that didn’t work, I used the Better Search Replace plugin to search for any instances of the incorrect URL in the database, and it found 33 or so instances which it then updated. However, one of those instances does not appear to be saving, in a table called “suwp_options” Every time I run the plugin to replace it, it immediately reverts back and I continue to get the error message on Stagecoach.
I suspect that this is what’s causing the Site URL not to match the Database, but the problem is wherever I look in the Database, I can’t find that url. I’m at a loss for what to do next – I’m fairly new to editing directly in the Database so I can’t even find the suwp_options file to edit it there (I made several backups so if anything breaks I can fix it). Any help or suggestions on I what I can do next would be much appreciated!
- The topic ‘Site URL not matching database- fix not saving?’ is closed to new replies.