Manually Updating the WordPress home and siteurl Options

There will be times when SpinupWP will attempt to update your site’s home and siteurl options. However, there are some cases in which this operation might fail (if you’ve manually updated the options already or if you’re using WP_HOME or WP_SITEURL in wp-config.php, for example). In these cases, SpinupWP will show you a warning alerting you that the options will need to be updated manually.

Warning after manually updating siteurl options

To update the options manually:

  1. Connect to your database using the CLI or your favorite app
  2. Find the options table
  3. Update the home and siteurl rows as required
  4. Clear the object caching, using WP-CLI wp cache flush

Update the options table manually

If you are using WP_HOME or WP_SITEURL in your wp-config.php you should also update those:

define( 'WP_HOME', 'http://turnipjuice.media' );
define( 'WP_SITEURL', 'http://turnipjuice.media' );

For more information on changing the site URL in WordPress see this doc.

If your site continues to redirect to the old domain, make sure that you’ve cleared both the object cache and page cache. If the problem persists, it’s possible that your browser is caching the redirect. You can confirm this by checking the response of cURL on the command line:

$ curl -I http://turnipjuice.media
HTTP/2 200
server: nginx
date: Mon, 27 Jan 2020 09:43:45 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
fastcgi-cache: MISS

If a 200 response is returned, the redirect is local to your browser and you should clear your browser cache.