Redirect to localhost
-
I changed some programs and articles on local Mac and was supposed to upload to production environment.
The instruction I tried was the following:
1. copy all files under htdocs to the production
2. export data through PHPMyAdmin DB and import into the production
3. update link using the following the SQLsUPDATE wp_options SET option_value = replace(option_value, ‘https://localhost:8888’, ‘https://foo.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
UPDATE wp_posts SET guid = replace(guid, ‘https://localhost:8888′,’https://foo.com’);
UPDATE wp_posts SET post_content = replace(post_content, ‘https://localhost:8888’, ‘https://foo.com’);
UPDATE wp_postmeta SET meta_value = replace(meta_value,’https://localhost:8888′,’foo.com’);Note: foo.com represents production url
I can access to https://foo.com/wp-admin, however when I access to https://foo.com then it redirects to https://localhost:8888/ja automatically.
I can access to https://foo.com/ja as well.
So only https://foo.com redirects to https://localhost:8888/ja.I guess I had something wrong with my process during the migration, where can I check first to solve this problem?
I have already checked wp-config.php, but there was no localhost:8888 in it.
Also WordPress Address and site address displays https://foo.com in WordPress Admin Screen -> General -> SettingI use WordPress 4.5.2 and nginx as web server as production.
And I use MAMP on local.
- The topic ‘Redirect to localhost’ is closed to new replies.