WordPress Redirects Incorrectly After Deployment to New Server

11th February, 2013 – 1:30 pm

If you like to use different ports (I do) for development locally then you might find when deploying a WordPress site live it tries to redirect to http://www.mysite.com:8080  or similar.  You can’t fix this in the admin interface as that redirects too.

 

To fix this you need to run some SQL direct on the DB.

Login to your MySQL DB – select the relevant DB (check the webconfig if you’re not sure).

USE myDB name;

 

Then run this (replacing MYSITE):

UPDATE wp_options SET option_value = ‘http://www.MYSITE.com’ WHERE option_name = ‘siteurl’;
UPDATE wp_options SET option_value = ‘http://www.MYSITE.com’ WHERE option_name = ‘home’;

This is what this person was finding: http://wordpress.org/support/topic/need-help-wordpress-site-redirects-to-a-different-domain

Post a Comment