codeofaninja
website

Transfer Wordpress Site From Local Computer to Server Without Reinstalling

Photo of Mike Dalisay
Modified Monday, August 1, 2011
by - @ninjazhai
Recently, I had to develop a website with a famous CMS - Wordpress. I have version 3.2.1. I'm so happy with it, the last time I worked with Wordpress was about 3 years ago, and I didn't appreciate it the way I appreciate it today.

Transfer Wordpress Site From Local Computer to Server Without Reinstalling
From your computer to your server.

So here's what I went through, I have WAMP on my computer and so I downloaded Wordpress, installed it locally and tried to play around with it. I downloaded free Wordpress themes, modified them, saved articles, etc. So now, I thought that the Wordpress site I worked on my computer is good enough to be online. I never thought setting up a website with Wordpress is this easy.

So I uploaded my files to the server and exported the SQL database. I tried to browse the site and guess what, tons of errors were shown. I didn't want to do a new Wordpress installation on my server. So I had to hack some Wordpress settings. Here's what I did:

1. Export SQL from local PhpMyAdmin to online PhpMyAdmin (If you're using PhpMyAdmin)

2. Copy Wordpress files from localhost to server using Filezilla (or any FTP software)

3. Login and then create your online database with the same database name you have locally

4. Browse wp_options table

5. The first row (siteurl) contains your local url, probably http://localhost/YouSiteName, you have to change that to your online domain such as http://YourSiteName.com/

6. So now you can login to your online admin panel http://YourSiteName.com/wp-admin/

7. After logging in, Go to Settings > General

8. Change the site address (URL) to http://YourSiteName.com/, then hit save button

9. Again, Go to Settings > Permalinks

10. At the bottom part of it, you will see the correct .htaccess code.

Transfer Wordpress Site From Local Computer to Server Without Reinstalling
Click to enlarge.
11. Copy it and access your current online .htaccess file and then paste the new .htaccess code, save and re-upload

That's it! Now you have successfully transferred a Wordpress site from your computer to Online server without reinstalling!
For FREE programming tutorials, click the red button below and subscribe! :)
Thanks for the comments!
 
 
Fundamentals
"First do it, then do it right, then do it better."
~ Addy Osmani
"Talk is cheap. Show me the code."
~ Linus Torvalds
Let's Stay Connected!
g+ r
Android app on Google Play
© 2011-2014 The Code Of A Ninja. All rights reserved. Proudly Powered by Google Blogger. Images, logos, marks or names mentioned herein are the property of their respective owners.