Many times, in search of better services, we usually move our blogs from one hosting provider to another. Many times we do fully migrate with all the files and databases, but if the present shared hosting is with limited disk space and we are using more than 90% of it, generally we fail to make a full backup for migration purposes. In such cases, using the standard WordPress Export feature we collect all the posts in XML format, prepare a fresh WordPress installation with the new host sever and after the full DNS propagation, Import it. In this case, at any moment, you may need to peep into the blog hosted at the previous server. For example, you may have left some codes at the side bar of the older version of the blog which you need to be placed again at the newer version, then what would you do? Obviously the first solution would come in your mind to change back the DNS into the old server to access the older version of the site. But DNS propagation is not that much simple thing that you’re thinking. It takes up to 72 hours to fully propagate from all geographical locations of the world and you’re bound to wait for it as nothing can be done make it faster. So, if you change the DNS again, then you’ll have to wait for another 24-72 hours, which is really pathetic, as your blog will be down again and again. So, what is the alternate method?
Well, fortunately there is a smarter solution to access your old blog at previous server. To do this, you’ll have to trick your computer to resolve to the old IP4 address of your blog with old server when you type your domain name in the address bar of your browser. Don’t it sounds little bit tricky? Yes, but always remember, all tricky things are not always sturdy always!! With only a few of your mouse clicks ans key pressing, you’ll be done bypassing your system to resolve the domain at the old server. Now let us come to the point, how to do this?
Well, the steps are as follows:
The DNS resolver in special cases are handled by a configuration file in your Windows computer called “hosts” which can be found at the location mentioned below-
For Mac PCs, it is located at
/private/etc/hosts and for Linux PCs the hosts file is located at
Open the hosts file with Text Editor, e.g. Notepad, and add your manual entries after the below line-
Add your old IP4 address of the previously hosted server along with your domain as done in the below example-
P.S.: We have used our own domain name and IP4 address for easy understanding. You’ll have to use your own domain name and IP4 address with your previous hosting/server.
Now save the file in the same location. The location is generally protected from modifications, so you many not save the changes directly. In such cases, create a new .txt file in your hard disk with the above data, rename it to hosts (without .txt extension) and move the file into the correct/original location mentioned above (for Windows PC- %SystemRoot%\system32\drivers\etc\). In some cases the hosts file may be missing. If it is not there, you can add it manually.
After all these, if you’ve done everything correctly, your domain will load from the previous server. Now you can access the old blog technically without any propagation or DNS change!! Remember, for the whole world your blog is accessible from the new server, but only you are accessing it from the old server. Now do whatever you had left before migrating. When you’re all done, remember to remove the custom DNS resolver (the bypass) from your computer’s configuration.