Post navigation

Moving WordPress to a new server

If you are like me, you test locally on MAMP, WAMP or XAMPP. At one point you need to take your Word­Press site and move it to your live server. It is imper­a­tive that you fol­low the proper steps. I’ve blown up the data­base, lost files, made lots of mis­takes and pulled out lots of my hair.

Save your­self lots of frus­tra­tion by just fol­low­ing the instruc­tions in this well writ­ten overview of mov­ing your server from a local com­puter to a live server.

Note: even after fol­low­ing these great instruc­tions I ran into some problems.

I develop on a test­ing server using XAMPP and when I uploaded the files, I was still get­ting http://localhost in my file paths. I thought I did a find and replace in my SQL file and I thought I did a find and replace in my php files but it still didn’t work right. I think vis­ited the perma­links page and clicked the update but­ton to update my .htac­cess file but it didn’t work. I looked around the net and found the fol­low­ing solutions:

bot­tom line: best solu­tion is to go into your live server php­myad­min and alter the wp_options data­base table (home and siteurl… just set them to your site’s domain… the video explains it great)

a quick fix (but not the best solu­tion) is to add this to your wp-config.php file (after your data­base infor­ma­tion)
/* this is a patch to make sure you are not view­ing local­host
a bet­ter way is to change the data­base */
define(‘WP_SITEURL’, ‘http://bhs.kingluddite.com’);
define(‘WP_HOME’, ‘http://bhs.kingluddite.com’);