wpvidZ

Learn WordPress With Video Tutorials

  • Blog
  • Browse
    • Backup & Restore
    • WordPress Localhost
    • WordPress Hosting
    • WordPress themes
    • Version Updates
    • Plugin Tips
    • Security
    • Tutorials
    • WordPress SEO
    • WP Miscellaneous
    • Sitemap
  • WP 5+ Tutorial
  • Search
wpvidZ Blog Localhost How to Upload WordPress localhost to live server manually

WordPress Localhost Complete Guides

How to Upload WordPress localhost to live server manually

Last updated on February 18, 2017
Posted on July 26, 2014

In this post, we are going to upload a WordPress localhost blog to live server manually without breaking serialized strings in the database.

In the past I would use a text editor to search and replace the old URL to the new URL, but I recently learn that WordPress uses serialized strings of PHP in its database.

So according to the codex page, we should use the Search and Replace Database script, so we don’t break our WordPress website in the future.

Before we go to the steps, I installed the localhost blog on the Mac with this MAMP tutorial, and if you use Windows OS, you can use WAMP as shown in this tut.

If you prefer to use a plugin:

Here are the manual steps:

Replace blogweb6move to your local WP site’s folder.

1. Download the search and replace script from this website.

I saved it on my desktop.

2. Open your website directory on your computer, because I use MAMP, I saved it on “blogweb6move” folder inside “htdocs” directory.

If you use WAMP server, it should be on “www” folder.

I compressed all WP files inside “blogweb6move” folder to be an blogweb6move-files.zip.

Localhost WordPress files are compressed to a zip file
Localhost WordPress files are compressed to a zip file

I am using The Unarchiver app to compress.

3. Next, we are going to import the localhost’s database, so go to localhost/MAMP in your browser, and click on “phpMyAdmin” tab. Select your database, if you are not sure which one, you can look at the “blogweb6move” wp-config.php

Maximum upload file size in WAMP WordPress

Once you’re in the right database, click on “Check All” and click “Export” from drop down menu.

Importing localhost database
Importing localhost database

4. Once we have the database .sql file, the WP site files, and the search and replace DB script, we go to our cPanel and create;

a. A new database

Creating a new database
Creating a new database

b. A new database username

New user for database
New user for database

c. Add database username to the database.

Add user to the database
Add user to the database

5. We go to File Manager, to our website’s root, and upload the database script, and our WP files here.

Uploaded files, localhost WP files, and the search replace database scripts.
Uploaded files, localhost WP files, and the search replace database scripts.

Then we extract the Search and Replace DB script first, and rename the folder to be shorter, like “srdb”, by selecting the file, and right click, select, “Rename”.

Renaming the script.
Renaming the script.

Delete the Search-Replace-DB-master.zip file once it’s extracted.

Extract our blogweb6move-files.zip, and delete the.zip file once it’s extracted.

6. Next, we import our localhost database to our server’s new database via phpMyAdmin. So go to your phpMyAdmin, and select the new database on “Database” tab, and click “import” tab, and choose “Browse your computer” – click “Choose File” button, and navigate to our localhost .sql file in our desktop, and click “Open”

Importing localhost database to server's database
Importing localhost database to server’s database

Scroll down, click “Go” button to import.

7. Then, we update the wp-config.php to match the new database we created on step (4) above with our new database’s name, new Username, and new database’s password.

Updating wp-config.php
Updating wp-config.php

It’s optional, but I recommend you updating the new secret key.

Save the wp-config.php

8. Now, the interesting step (new method is always interesting to me), add /srdb in your domain name in the browser, it should load the Search Replace DB script we downloaded in the step 1 above.

Search and Replace database for WordPress
Search and Replace database for WordPress

In the replace box: enter your localhost URL, mine is, http://localhost/blogweb6move (without forward slash)

Then in “with” box, enter your live domain, mine, http://wphowtosite.com (also no forward slash, it has to match with the localhost URL)

Click “dry run” to see which tables will be changed or updated.

Then, you can click “live run” to perform the search and replace process.

  • Is my site loading fast? I use this shared hosting
  • Try my theme >

9. Now if you check your live site, you might find, error page when you click one of your post or page. Login to your dashboard, and click “Save Changes” in “General” and “Permalinks” setting.

10. This is VERY important step, you have to delete the script manually, since we rename the folder earlier.

Go to your cPanel, and select the “srdb” folder, and click “Delete” button.

I hope this helps.

local localhost move server upload

Latest Posts

  • Twenty Nineteen Theme Full Tutorial – Creating a Website
  • Uninstall W3 Total Cache Plugin – Incredibly Easy!
  • Create WordPress Website 2018 on SiteGround Genesis
  • WordPress Noopener Noreferrer Rel Attribute Quick Fix
  • WordPress CDN Setup with MaxCDN and W3 Total Cache Plugin
  • Twenty Seventeen One Page Parallax Scrolling Website Style
  • How To Add Google Map in WordPress Contact Page
  • WordPress 4.7 Justify Text and Underline
  • Twenty Seventeen Footer “Proudly Powered By WordPress” Text
  • How To Add YouTube Subscribe Button To WordPress Website
← Steps to Install WordPress on Windows 8 and WAMP 2.4

Comments

  1. Sueli says

    January 22, 2015 at 5:03 am

    Hi Kimi, I just sent you a question about my issue after migration the website.

    I forgot to mention that in one of my attempts, instead of replacing the URLs with Notepadd++, I used the Online WordPress Serialized PHP Search and Replace which allows for replacing an old domain or URL with a new one while fixing the serialized data at the same time.

    That didn’t work either 🙁

    Thanks

    Sueli Vieira

  2. savvas kevrekidis says

    January 25, 2015 at 10:12 pm

    Nice article and very helful. Thank you.

Comment form on this post is closed after 60 days.

Search

Worth Reading

  • Steps to Install WordPress on Windows 8 and WAMP 2.4
  • Install WordPress on Mavericks OS X 2014
  • Maximum upload file size in WAMP WordPress

Backup & Restore

Backup WordPress Without a Plugin or FTP

Export WordPress Database using phpMyAdmin

BigDump Alternative – When BigDump Failed Importing Large WP Database

At This Place The Current Query Includes More Than 300 Dump Lines

View All..

Live Online Website

View All..

Offline Installation

How to Upload WordPress localhost to live server manually

Steps to Install WordPress on Windows 8 and WAMP 2.4

Install WordPress on Mavericks OS X 2014

Maximum upload file size in WAMP WordPress

View All..


WPvidz Hosting Image

  • About Me
  • Contact
  • Affiliate Disclosure
  • Privacy Policy
  • Term of Use

Copyright© 2023 wpvidz.com SG2021 | sitemap.xml


WPvidz.com is independent from WordPress.org but is proudly powered by WordPress & its block-based editor (Gutenberg)

WpvidZ.com uses cookies" to give you the best browsing experience possible. If you click "I Accept" below then you are consenting to this. For more information about your privacy settings on this website, please visit the Privacy Policy page. I Accept