February 27, 201214 yr Hi guys and girls. I have been trying to figure out the best way of working when it comes to WordPress and deploying sites live. Basically what is the quickest, easiest and most reliable way of moving an entire WordPress site from local to live, or from one domain to the other? I always develop sites locally on my machine using XAMPP, then I upload the site into a test server when showing the client. To do this I create a new database on the sever. Then I migrate everything across to the clients server when finally deploying the site live. When it comes to the data, as far as I can tell I have the following 2 options which both are not exactly ideal: 1) First of all, exporting the database in phpMyAdmin isn't the best solution since all of the links (to images etc) are exported and will all need rewriting. Is there a way around this which is quick to correct? It seems exporting the database in this way is great for backup and restore use, but I'm not convinced it is a solution when it comes from moving all the data from another location. Anyone have any thoughts on this? I have tried the WordPress Admin Tools > Export method. This seems to be pretty cleaver as it is supposed to rewrite links, but it left all of the old links in the posts which is pretty annoying, although this should be something which I could correct with Finding/Replacing url strings in the source code. Anything thing which was annoying is the Featured image's were all messed up so I ended up having to re-upload them manually. This is far from ideal when it comes to more content heavy sites. Anyone managed to get this feature working ok? Does anyone reading this do anything different than the above and can suggest a better workflow? Is there a plugin which handles this or am I missing something quite obvious? (can never rule that out!!) Cheers Rich
February 27, 201214 yr Back up your dev database. Log into WordPress, go to Settings > General and change both URLs to the live site. Save, don't worry about the error message. Export another SQL dump of your dev database, and import it into your live server. (Optionally) restore your dev database from your first backup.
February 27, 201214 yr Author Ah that makes sense. I'll try that next time and see how I get on. Thanks Edited February 27, 201214 yr by richimgd
Create an account or sign in to comment