The fastest (and correct) way to transfer a WP site from localhost to the hosting server
System administration

The fastest (and correct) way to transfer a WP site from localhost to the hosting server

March 14, 2013

I have wasted so many time (and also so many times), trying to figured out what is wrong with the WP instillation on the web hosting server, that I decided to write the correct procedure to my blog. In this way I will never forget, and maybe you will also have some benefit of it 🙂

OK, here is the symptoms. On the localhost, the website is working great, but when you are trying to transfer it to the web hosting server, there compare an errors, like: 500 – Internal server error. To avoid this pain in the …, just follow these steps:

  1. Export the DB
  2. Open the DB exported file in an editor, like notepad++
  3. Replace all the string “http://localhost/[your_folder]” with the new domain like “http://test.com”
  4. Import the DB
  5. Open the “.htaccess” file and replace the path of the localhost folder with the root path (if you are working on the root folder, then just skip this step)
    1. There is two lines which must be replaced:
      1. RewriteBase /your_folder/
      2. RewriteRule . /your_folder/index.php [L]
  6. Transfer all the files to the server
  7. And the final step: Set 755 permissions to all the files
2

Follow deanpodgornik on

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *