Quantcast
Channel: Topic Tag: MySQL | WordPress.org
Viewing all articles
Browse latest Browse all 5530

SamValiant on "Staging site redirects to main site"

$
0
0

Hey all,

So I have quite a big wordpress site running woocommerce. I decided that I needed a staging site now that my theme isn't being updated. However now that I've done the following I'm getting an issue whereby if I visit my staging.example.com it just forwards to my main site.

I did the following process (note the SSL incase that makes a difference)

1. Created http://staging.example.com
2. Created new database
3. Downloaded entire wordpress folder from https://www.example.com
4. Uploaded files to staging.example.com
5. Edited config to point to new database
6. Exported 120mb database to tmp folder in sql format
7. Imported sql dump into new database using SSH

mysql -p -u username database < file.sql

8. Updated database details using

UPDATE wp_options SET option_value = REPLACE(option_value, 'https://www.example.com', 'http://staging.example.com');
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'https://www.example.com', 'http://staging.example.com');
UPDATE wp_posts SET guid = REPLACE(guid, 'https://www.example.com', 'http://staging.example.com');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'https://www.example.com', 'http://staging.example.com');

9. Went into plugins folder via FTP and disabled plugins which may effect routing by rename the folder to OFFpluginname. I disabled a popup plugin, SSL redirect plugin, and caching plugin.

10. Went to visit the new staging site's admin panel and get directed to the main site's admin panel.

What's going on? What did I do wrong?


Viewing all articles
Browse latest Browse all 5530

Trending Articles