Transfer WordPress Site From Local Computer to Server Without Reinstalling

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!

Hi! I'm Mike Dalisay, the co-founder of codeofaninja.com, a site that helps you build web applications with PHP and JavaScript. Need support? Comment below or contact [email protected]

I'm also passionate about technology and enjoy sharing my experience and learnings online. Connect with me on LinkedIn, Twitter, Facebook, and Instagram.