Link to home
Create AccountLog in
Avatar of Flipp
FlippFlag for Australia

asked on

Testing a Word Press Site

I am midst migration of a Word Press site from a hosting provider to a new one and need a way to test site before changing DNS to point to new provider.

Is there a way I can temporarily test this without changing production/DNS?

I have followed http://codex.wordpress.org/Moving_WordPress and in the first section it says I can use the siteurl and home in Options table but can not find home anywhere?
Avatar of Rartemass
Rartemass
Flag of Australia image

I'm assuming you have a copy on both the old and new host.
If that is wrong please let me know.

The easiest way I can think of without changing anything in wordpress, is to type in the IP address of the new location. If you are going to update DNS yourself, I'm assuming you have the IP address of the new location.

If not you should be able to get it from your new provider's acces portal (eg cPanel).
If your new IP is 10.0.0.1 for example and the website is www.mydomain.com\wordpress, then replace the domain with the IP ie 10.0.0.1\wordpress

You can then do the same with the existing one and compare the two.
Avatar of Flipp

ASKER

Yes I have both old and new, but if I type in http://NewIP/WordPress then all the links do not work for me to click through.

I would of thought I could just change options in wp_options table which would then carry through the site but it appears WP does not work that way?
You can test it locally by editing your hosts file.
This is usually located at C:\Windows\System32\Drivers\etc

Edit the file called "hosts" with notepad or wordpad.
Enter a new line as below and save the file:

10.0.0.1 yourdomain.com #new site

The IP should be the new address. What this does is when you access a website, it will check the IP address here first (the hosts file is preloaded to the local DNS cache).

You may need to open a command prompt and run the following command to clear the local DNS cache first and reload the above change:
ipconfig /flushdns

This will only work from the PC you made the changes to. Once happy you can change the IP to the old one in the hosts file, or simply delete the line.
ASKER CERTIFIED SOLUTION
Avatar of Flipp
Flipp
Flag of Australia image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Flipp

ASKER

Found suitable answer through some additional research of other sites outside of EE.