Smooth move to a new host
Before I started moving this site to a new host (slicehost.com), my plan was very simple in my head. My plan that I followed was:
- Export Data using word press admin’s tool
- Create database called ‘wpblog’ in a new host
- Create database user and password
- Download wp and copied them to a new host (it will be a brand new wp)
- Update wp-config.php to reflect the newly created database name, user, and password
- Updated *hosts* file to map my domain to the new host’s IP address
- Fired up a browser, went to the domain (where wp is newly installed)
- Followed the instruction to install wp
- Go to admin using “admin” account and the password wordpress auto generated
- Change wp-content directory’s permission to 777 by using FTP client or SSH and chmod it.
- Use *Import* from Tools in the admin page
- Choose auto import photos or images.. something like that
- Copy theme in the old host to a new host
- Copy all plugins in the old host to a new host
- Download *search and replace* from this link and install it
- Select the theme that’s just copied over from the old host
- Activate plugins that are just copied over from the old host
- Look for broken images or any attachments in pages.
- (If found, write down the host name(usually IP address) that is in img src or somewhere like that. Go to admin page, activate *search and replace* plugin, go to *search and replace* page found in the settings, select *content*, type the host name found in the previous step, type the current host name, and then hit *Go*
- Switch name server after verifying everything is intact.
I think the steps that I mentioned above should let you move your wordpress to a new host very smoothly. However, you might wonder what you really have to do in each step specifically the followings:
Updated *hosts* file to map my domain to the new host’s IP address
If you use mac, open a terminal and type this:
sudo vim /etc/hosts
After you type it above, your screen will look something like this:
## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost
And add this at the end of the line:
127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost my.new.ip.address www.shinstudio.com
my.new.ip.address is, of course, your new ip address that is given to you when you sign up a new host plan. By updating /etc/hosts file, you can see your site on the new host as if the site is already set up. Basically hosts file will redirect “www.shinstudio.com” request to the ip address you specify. This technique comes in handy when you want to test the site on a new host but do not want to switch name server yet. (’cause you do not want to see something broken when name server occurs)
If you are using windows XP, then hosts file should be at windows/system32/drivers/etc/hosts.
Let me know if you have a hard time understanding any of steps that I listed.






No comments yet.