0

I am trying to set up a test site to make some changes to my live site. I followed all steps ( create subdomain,copy WP files, import database, change wp-config, edit site+URL entries in DB tables). When changing the WP URL site from WP-admin to access the new WP, I get redirected to the old WP. Why is that? I copeid the htaccess file as well in the new root. The website in question is thealoftgroup.com and I want to be able to work on new.thealoftgroup.com, while leaving the original website untouched.

Any help is greatly appreciated!

2 Answers 2

0

WordPress stores the site URL in a few places in the database in serialized arrays, which can break if you do a simple search & replace on the database. You need to use a tool like this which is aware of serialized arrays to do the replacement.

You can bypass the broken URLs enough to access your dev site by defining the WP_HOME and WP_SITEURL constants in your wp-config.php but it's best to do the replacement properly.

0

Simply create a subdomain as test.thealoftgroup.com for the purpose of this illustration.

Then, run a fresh installation of WordPress (same version as your initial site) onto your newly created subdomain, pointing to a new database you've created for this purpose as well.

After this stage, do install the theme you are running on your main site onto your test subdomain.

The next step is to make sure you replicate all of your main WordPress site settings and contents onto your test subdomain. For that purpose, you can import the database of your main WordPress site into your new test subdomain's database, not forgetting to alter all thealoftgroup.com with test.thealoftgroup.com.

Do add your main WordPress site's upload folder into your test location and all will be ready as you wanted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.