WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Tutorials» How to Move a Live WordPress Site to Local Server

How to Move a Live WordPress Site to Local Server

Last updated on October 7th, 2020 by Editorial Staff
296 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
How to Move a Live WordPress Site to Local Server

Do you want to move a live WordPress website to a local server on your computer?

Installing WordPress on your computer (local server) allows you to easily learn WordPress and test things. When you move a live WordPress site to a local server, it enables you to experiment with the same data as your live site.

In this article, we’ll show you how to easily move a live WordPress site to a local server without breaking anything.

Moving a live WordPress site to a local server on your computer

Why and Who Would Want to Move a live WordPress Site to Local Server?

If you have been running WordPress website for sometime, you may want to try out new themes or a plugin. However, doing this on a live website may result in poor user experience for your users.

To avoid this, many users create a copy of their WordPress website on a local server to test new themes, plugins, or do development testing.

This allows you to set up your theme with all your content and test all the features without worrying about breaking your site. Many users copy their site to a local server to practice their WordPress and coding skills with actual site data.

Even though you can do all the testing with dummy content in WordPress, real site data gives you a better visual representation of how these changes will appear on your live site.

Preparing to Move a Local Site to Local Server

First, you need to make sure that you always back up your WordPress website. There are several great WordPress backup plugins that you can use.

Secondly, you need to install a local server environment on your computer. You can use WAMP for Windows, and MAMP for Mac. Once you have set up the environment, you need to create a new database using phpMyAdmin.

Simply visit the following URL in your browser to launch phpMyAdmin.

http://localhost/phpmyadmin/
http://localhost:8080/phpmyadmin/

From here you need to click on ‘Databases’ tab and create a new database. You’ll need this database to later to unpack your live site data.

Create database

You are now ready to move your live WordPress site to local server.

Method 1. Moving Live WordPress Site to Local Server using Plugin

This method is easier and recommended for all users.

First thing you need to do is install and activate the Duplicator plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Duplicator allows you to easily create a duplicate package of your entire website. It can be used to move your WordPress site to a new location, and can also be used as a backup plugin.

Upon activation, the plugin adds a new “Duplicator” menu item in your WordPress admin sidebar. Clicking on it will take you to the packages screen of the plugin.

Creating new package in Duplicator

To create a new package, you need to click on the create new package button. Duplicator will start the package wizard, and you need to click on the Next button to continue.

Duplicator package set up

The plugin will then san your website and run some background checks. It will then show you a summary of those checks. If everything looks good, then click on the ‘Build’ button to continue.

Duplicator scan

Duplicator will now create your website package.

Once finished, you’ll see an archive zip file that contains all your website data, and an installer file. You need to download both files to your computer.

Download package files

You are now ready to unpack and install these files on your local server.

First, you need to create a new folder in your local server’s root folder. This is the folder where your local server stores all websites.

For instance, if you are using MAMP, then it will be /Applications/MAMP/htdocs/ folder. Alternatively if you are using WAMP, then it would be C:\wamp\www\ folder.

Inside this folder, you can make new folders for each new website that you want to import or create on your local server.

Creating a website folder on your local server

After that, you need to open the folder you created for your local website and then copy and paste both the archive zip file and the installer script you downloaded earlier.

Copy and paste Duplicator package and installer files

To run the installation, you need to open the installer.php script in your web browser.

For example if you pasted both files in /mylocalsite/ folder, then you will access them in your browser by visiting http://localhost/mylocalsite/installer.php.

You will now see the Duplicator installation script like this:

Duplicator installer screen

Click on the Next button to continue.

Duplicator will now unpack the archive zip file and will ask you to enter your local site’s database information. This is the database you created earlier.

Duplicator database information

The server name is almost always localhost and username is root. In most cases, your local server installation does not have a password set for root, so you can leave that blank.

At the bottom of the page, you’ll see a ‘Test Database’ button that you can use to make sure your database information is correct.

Test database connection

If everything looks good, then click on the ‘Next’ button to continue.

Duplicator will now import your WordPress database. After that, it will ask you to double-check the new website information that it has automatically detected.

Check local site information

Click on the Next button to continue.

Duplicator will now finish the setup and will show you a button to log into your local site. You’ll use the same WordPress user name and password that you use on your live site.

Import finished

That’s all, you have successfully moved your live site to local server.

Method 2. Manually Move a Live WordPress Site to Local Server

In case the plugin does not work for you, then you can always manually move your live site to a local server. The first thing you would need is to back up your website manually from your WordPress hosting account.

Step 1. Export your live site’s WordPress database

To export your live site’s WordPress database, you need to log into your cPanel dashboard and click on phpMyAdmin.

Note: We’re showing screenshots from Bluehost dashboard.

cPanel phpMyAdmin

Inside phpMyAdmin, you need to select the database you want to export and then click on the export tab on the top.

Export WordPress database manually

phpMyAdmin will now ask you to choose either quick or custom export method. We recommend using custom method and choosing zip as the compression method.

Sometimes WordPress plugins can create their own tables inside your WordPress database. If you are not using that plugin anymore, then the custom method allows you to exclude those tables.

Leave rest of the options as they are and click on the Go button to download your database backup in zip format.

Select export options

PhpMyAdmin will now download your database file. For more details, see our tutorial on how to backup your WordPress database manually.

Step 2. Download all your WordPress files

The next step is to download your WordPress files. To do that you need to connect to your WordPress site using an FTP client.

Once connected, select all your WordPress files and download them to your computer.

Download all your WordPress files

Step 3. Import your WordPress files and database to local server

After downloading your WordPress files, you need to create a folder on your local server where you want to import the local site.

If you are using WAMP then you would want to create a folder inside C:\wamp\www\ folder for your local site. MAMP users would need to create a folder in /Applications/MAMP/htdocs/ folder.

After that, simply copy and paste your WordPress files in the new folder.

Next, you need to import your WordPress database. Simply open the phpMyAdmin on your local server by visiting the following URL:

http://localhost/phpmyadmin/

Since you have already created the database earlier, you now need to select it and then click on the Import tab at the top.

Import WordPress database

Click on the ‘Choose File’ button to select and upload the database export file you downloaded in the first step. After that, click on the ‘Go’ button at the bottom of the page.

PhpMyAdmin will now unzip and import your WordPress database.

Now that your database is all set up, you need to update the URLs inside your WordPress database referencing to your live site.

You can do this by running an SQL query in phpMyAdmin. Make sure you have selected your local site’s database and then click on SQL.

Updating URLs in database

In phpMyAdmin’s SQL screen copy and paste this code, make sure that you replace example.com with your live site’s URL and http://localhost/mylocalsite with the local server URL of your site.

UPDATE wp_options SET option_value = replace(option_value, 'https://www.example.com', 'http://localhost/mylocalsite') WHERE option_name = 'home' OR option_name = 'siteurl';
 
UPDATE wp_posts SET post_content = replace(post_content, 'https://www.example.com', 'http://localhost/mylocalsite');
 
UPDATE wp_postmeta SET meta_value = replace(meta_value,'https://www.example.com','hhttp://localhost/mylocalsite');

This query will replace refences to your live site’s URL from database and replace it with the localhost URL.

Step 4. Update wp-config.php file

The final step is to update your local site’s wp-config.php file. This file contains WordPress settings including how to connect to your WordPress database.

Simply go to the folder where you installed WordPress on your local server and then open wp-config.php file in a text editor like Notepad.

Replace the database name with the one you created in phpMyAdmin on your localhost.

After that, replace the database username with your local MySQL username, usually it is root. If you have set a password for the MySQL user root on your localhost, then enter that password. Otherwise, leave it empty and save your changes.

/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

/** MySQL database username */
define('DB_USER', 'username_here');

/** MySQL database password */
define('DB_PASSWORD', 'password_here');

You can now visit your local site in a browser window by entering the URL like this:

http://localhost/mylocalsite/

Replace ‘mylocalsite’ with the name of the folder where you copied your WordPress files.

That’s all, your live WordPress site is now copied to your local server.

We hope this article helped you learn how to easily move a live WordPress site to local server. You may also want to see our guide on how to easily make a staging site for WordPress for testing, or how to move a WordPress site from local server to live site.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

296 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

236 Comments

Leave a Reply
  1. McKenzie says:
    Feb 17, 2021 at 4:31 am

    Thanks for your tutorial.

    The front page is partially working but every other page is not working at all. Furthermore, it seems that front page is loading All the pages. What could be wrong?

    Reply
    • WPBeginner Support says:
      Feb 17, 2021 at 9:40 am

      We would recommend starting by going through our troubleshooting guide below:

      https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/

      Reply
  2. Collins says:
    Jan 22, 2021 at 4:07 am

    Hi, Thank you for this super useful article.

    I don’t know why mine doesn’t just work, I have done the exact same thing and gotten all the correct feedback. Whenever I try to open the home page localhost/site/ I get a page that doesn’t exist with the headers and footers and the rest of the pages still point to the live site.

    Reply
    • WPBeginner Support says:
      Jan 22, 2021 at 10:37 am

      It sounds like you may have not set the URLs correctly. You would likely want to go to method 2 and try the SQL changes to update your URLs.

      Reply
  3. Murat says:
    Jan 11, 2021 at 10:55 pm

    For those who are getting “wp_options doesn’t exist” error, you may have changed your table_prefix before. Just open the wp_config.php file and check $table_prefix = ‘wp_’

    if the value isn’t “wp_” you get that error so when pasting the code edit it accordingly, for instance:
    UPDATE xx_options SET option_value………..

    Reply
    • WPBeginner Support says:
      Jan 12, 2021 at 9:08 am

      Thanks for sharing this should someone be running into that error :)

      Reply
  4. Chinwe says:
    Dec 10, 2020 at 4:34 am

    Thank you so much for this. It worked.

    Reply
    • WPBeginner Support says:
      Dec 10, 2020 at 9:54 am

      Glad our guide was helpful :)

      Reply
  5. Ivana Spasic says:
    Dec 5, 2020 at 1:53 pm

    When I copy and paste the code you provided to phpMyAdmin’s SQL screen, I am getting message: #1146 – Table ‘xyz.wp_options’ doesn’t exist.

    How can this be fixed?

    Reply
    • WPBeginner Support says:
      Dec 7, 2020 at 11:29 am

      You would want to ensure you have the correct database selected for the most common reason for that issue.

      Reply
  6. Jill says:
    Dec 3, 2020 at 3:12 pm

    I used the Duplicator plugin to set up a copy of a website for a non-profit that I inherited. After reloading it so that all plugins are disabled I finally came to the conclusion that my site is attempting to use https:// to log in to the dashboard. To further confuse me, an empty site that I created on localhost does NOT use https:// for log in to the dashboard. I understand the value of https:// on the live site, but it appears there may be a way to disable it on localhost?

    Reply
    • WPBeginner Support says:
      Dec 4, 2020 at 9:40 am

      For changing your local site’s URL you can follow our guide below and remove the s:

      https://www.wpbeginner.com/wp-tutorials/how-to-change-your-wordpress-site-urls-step-by-step

      Reply
  7. Hazel beaver says:
    Oct 23, 2020 at 10:20 am

    Is there a plugin that allows you to download a zip file from the live site then upload into a fresh install of wordpress on the local host in a simpler way?

    Reply
    • WPBeginner Support says:
      Oct 26, 2020 at 10:30 am

      For what it sounds like you’re wanting, the closest would be method 2 of this guide that you would want to take a look at.

      Reply
  8. Daniel says:
    Nov 7, 2019 at 7:22 am

    I successfully uploaded to localhost but when i try to use localhost/mysite_location/wp-admin, it redirects to the live site. Not the one on the localhost.
    Need help :(

    Reply
    • WPBeginner Support says:
      Nov 7, 2019 at 9:44 am

      You would want to go into your site’s database, go to the options table, and change your site url and address to localhost there. For how to modify your database you would want to take a look at our article here: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-wordpress-database-management-with-phpmyadmin/

      Reply
  9. Bine says:
    Jul 1, 2019 at 6:02 am

    Great tutorial. It’s straight forward. Unfortunately I still get redirected to the dashboard as soon as I try to enter my URL. I followed all the steps but something must be missing. Does anyone has an idea what the problem might be? Cheers

    Reply
    • WPBeginner Support says:
      Jul 1, 2019 at 1:29 pm

      You may want to check your options table in your database to be sure that you didn’t set the site’s url to your wp-admin area

      Reply
  10. Niaz Muhammad says:
    Jun 20, 2019 at 2:07 am

    Great tutorial thanks for sharing your knowledge

    Reply
    • WPBeginner Support says:
      Jun 20, 2019 at 10:13 am

      Glad you liked our article :)

      Reply
  11. alvaro hernandez says:
    May 28, 2019 at 3:30 pm

    it works great!!! i love you!

    Reply
    • WPBeginner Support says:
      May 29, 2019 at 9:55 am

      Glad our guide was helpful :)

      Reply
  12. T_WA says:
    Mar 10, 2019 at 7:53 am

    Hi, thanks for the tutorial, it’s was super helpful!!
    However, after following all your steps, I have problems “establishing secure connection” (I guess because of the SSL) and thus it doesn’t work . I even tried and changed a line ‘DB_HOST’ to ‘localhost/localhost:8888’ in the wp-config.php that wasn’t mentioned in the video but didn’t help.

    Also, when changing links I tried many variations nothing worked. Has someone faced a similar issue and found a solutions to it?

    Reply
    • WPBeginner Support says:
      Mar 11, 2019 at 1:10 pm

      Did you attempt to clear all of your caching after updating the URLs and is there the option to continue anyway under advanced on that error page?

      Reply
  13. Said says:
    Feb 25, 2019 at 6:23 am

    First of all thank you for theses clear explanations that I followed to the letter. The result is that i can access to to my site homepage locally, but links in this homepage do not seem to work because when I click on a link, for example :
    localhost.mysite.com/subject.html
    it is the following page that is displayed fir all links :
    localhost/dashboard

    Can you help me to resolve this problem
    Thanks in advance

    Reply
    • WPBeginner Support says:
      Feb 26, 2019 at 12:51 pm

      It is likely due to your localhost not accepting pretty permalinks: https://www.wpbeginner.com/wp-tutorials/how-to-enable-custom-permalinks-in-wordpress-wamp-installation/

      Reply
  14. Ifthikar Hussain says:
    Feb 6, 2019 at 2:40 am

    Great Working, am facing a new problem which is i can access the only home page of my word press side. how can i able to access other pages??

    Reply
    • WPBeginner Support says:
      Feb 6, 2019 at 10:38 am

      It would depend on what error you are running into. To get started you could take a look at the troubleshooting steps in: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/

      Reply
  15. Hannah says:
    Jan 29, 2019 at 11:10 am

    Hi there,

    this is really easy to follow and helpful so thank you for that.

    I do have a very straightforward question though.

    When updating the URLs, you say to replace http:// example.com with your live site, but what if my live site uses https?

    Reply
    • WPBeginner Support says:
      Jan 29, 2019 at 11:53 am

      If you’re moving your site to a local server we recommend http to avoid local installation issues with not having an SSL, you would change to https if you’re moving the content back to a live site that is using SSL.

      Reply
  16. Philip says:
    Jan 7, 2019 at 1:32 pm

    Thanks. You wrote this article over 5 years ago, and it’s still good. I managed to set everything up nicely without too much trouble by following your manual instructions. Thanks in particular for the SQL queries.
    Philip

    Reply
    • WPBeginner Support says:
      Jan 7, 2019 at 2:56 pm

      Glad our guide could be helpful and still works :)

      Reply
  17. Basem says:
    Dec 9, 2018 at 6:41 pm

    After finishing the installation I click Admin Login button. the browser open new window to the installation of wordpress again? and the login page is not there

    I checked the folders. all files are copied.

    Reply
  18. Patrick says:
    Oct 18, 2018 at 9:46 am

    Somebody find a fix for the localhost site copy (from live https) administration wanting to use https ?

    Reply
  19. dowlass says:
    Oct 17, 2018 at 8:49 am

    I found your instructions for the manual move of my site (from live server to localhost) worked pretty well. I had to do the permalinks thing – just click on ‘save’ without changing anything – to make links work properly. But otherwise it’s mostly good.

    However, I’ve encountered a problem when trying to use new themes. If I add a new theme, then sure the theme installs ok and shows up on the theme page. However, if I try to preview or activate the new theme I just get a totally blank page – even the admin goes blank. The only recourse is to use the browser back button to get back to the admin view where I can delete the theme.

    Adding new themes and trying to use them just makes the whole thing fall over!

    Any ideas?

    (p.s. I’m using a very old version of WordPress – 2.9.2…!! Which is the reason for wanting to play with it on localhost and work out the best way to upgrade.)

    Reply
  20. Michael says:
    Jul 20, 2018 at 12:27 am

    Tutorial worked pretty good but I had “internal Server Error”. I was downloading an entire network installation. I recopied the wp-config.php file because it had become compressed, all spacing removed. Then replaced the .htaccess with a fresh network version and that “RewriteBase /sitename/” was to the folder of the installation, instead of “RewriteBase /”

    Reply
  21. Emma says:
    Jun 5, 2018 at 4:53 am

    The instructions are clear and straightfoward but unfortunately I am having a total nightmare getting my site to work on the local server. After much trial and I’ve managed to get connect to the database and get some of the site content displayed but links aren’t working (they’re not found, apparently). I’m using MAMP Pro for Windows. Maybe I’ll try XAMMP – or using a Mac – instead. I think alot of the problem is to do with permissions but don’t really know where to start there seem to be so many fixes needed!

    Reply
    • WPBeginner Support says:
      Jun 5, 2018 at 11:49 am

      Hi Emma,

      If you can access the WordPress admin area, then try visiting Settings » Permalinks and then click on the save changes button without changing anything.

      Reply
  22. andy says:
    Apr 17, 2018 at 5:21 am

    I solve my problem. If you manually moved wordpress to localhost, and you install w3 total cache in your wordpress, you have to clear the browser cache after change database and wp-config. Or just open your localhost site with different browser.

    Reply
  23. andy says:
    Apr 17, 2018 at 4:57 am

    I have changed wp-config and all database url to localhost, but localhost still redirect me to live site. Why? I cannot install any plugin like duplicator anymore because the site already deleted

    Reply
    • Suhana says:
      May 2, 2018 at 6:20 pm

      Hi Andy

      Have u tried changing the settings from wp dashboard?

      Settings-> General->WordPress Address (URL),Site Address (URL)

      Even if it shows the localhost address just save it and check. Hope it helps.

      Reply
  24. Patrick Pogi says:
    Jan 30, 2018 at 4:39 am

    Hi wpbeginner,

    Thank you for the tutorial, it helps me a lot. I tried the manual install and but in the end it keeps redirecting me into wordpress installation page. Pls help me, i think i’m almost done. Im using xampp.

    Thank you

    Reply
  25. Jason says:
    Jan 22, 2018 at 11:24 pm

    Hi,
    Im having issues while moving my site, it says LOCALHOST REFUSED TO CONNECT.
    But my other local sites are okay.
    Im moving it to local because something gone terribly wrong and my page woun’t load on the server’s.

    Please any suggestion or advise is appriciated

    Reply
    • John says:
      Jun 11, 2018 at 6:16 pm

      In MAMP Preferences set your Ports to – Apache 80, Nginx 443 and MySQL 3306 and see if that fixes it

      Reply
  26. Steve says:
    Jan 19, 2018 at 12:07 pm

    Thanks for this article, I found it very useful but would like to add to it if I may.

    I used the manual method successfully with one exception, I could not navigate to any of the pages or posts from my sites menu. I would get a page not found error. I tried everything here, saving the premalinks, but nothing worked. I finally found a post elsewhere that gave me the solution. I had to modify a line in Apache’s httpd.conf file. Open the file and search for ‘AllowOverride’. If it looks like this: ‘AllowOverride None’, change it to ‘AllowOverride All’. I could not get to every page and post and see all the content!. FYI, there are several ‘AllowOverride’ options but the one you are looking for resides on a line by itself. I know this is a WordPress and not an Apache config forum but others may be experiencing the same issue. Hope this helps.

    Reply
  27. Braun Philippe says:
    Dec 20, 2017 at 1:09 pm

    Hello Guys,

    I’m running into a serious problem. When I click on my local site forler with servers ON on MAMP, it redirects to live site :-( I’ve done everything this tutorial says, do you know where is the problem ?

    Thanks for your help

    Reply
  28. Sara says:
    Dec 14, 2017 at 9:16 am

    Hi

    I am also having blank screen like IDRIS D…any suggestion

    Reply
  29. Idris D says:
    Dec 3, 2017 at 9:22 am

    Unfortuntely when I follow this guide, all the links in my local site redirect to the live site.
    Any suggestions?

    Reply
  30. Adrian Stangell says:
    Nov 3, 2017 at 5:50 am

    Hi,
    after following the instructions for the manual migration I end up with a blank screen when I try to access my website on the localhost. Any ideas?

    Reply
  31. Joel M says:
    Oct 31, 2017 at 4:06 pm

    After running the SQL Query to replace links I receive a 1064 error – it seems there is a problem with the code syntax. I’m guessing it’s the (:) in my localhost url : ‘http://localhost:888/localwebsite’ – any ideas how I can work around this? I am using MAMP to run the local server.

    Reply
    • Aaron L says:
      Jan 25, 2018 at 4:09 am

      try four ‘8’s instead of 3…. localhost:8888/localwebsite

      Reply
  32. Natalie Bell says:
    Aug 26, 2017 at 3:29 pm

    Hi there!
    I’ve had a successful migration to local site except for my Media Library, every picture is there (lots of files), url’s are correct, but when they don’t show up in the actual blog. When I go to media library it just shows the grid of the pics – all blank, but in description, url etc everything is correct.

    Any idea what to do next?

    Reply
    • Grant says:
      Sep 18, 2017 at 11:58 pm

      Try going to your wordpress dashboard, click on the settings menu near the bottom of the sidebar on the left. Then click on the reading menu in the settings submenu, scroll down to the site visibility options and select the ‘allow search engines to index’ option and click save changes at the bottom of the page. See if that works, if not you may have to go to your terminal and manually pull media files from your old site recursively – I had to go this route and can walk you through it if you have any questions. Hope this helps

      Reply
  33. Carolina says:
    Aug 2, 2017 at 5:59 am

    Hi there, Thanks for the post, it’s a huge success for me.
    So far, I’ve been able to get to the wp-login page.
    and I’m sorry if this is a very silly question. but I’m really newbie with wp

    my problem is I can’t login :$

    I’ve tried the same logins as the live details = don’t work
    as I haven’t set up the dashboard and it’s a local. no email will work.

    what should I do?
    btw, it’s on a mac.

    Many thanks in advanced. Help is appreciated!!

    Reply
    • WPBeginner Support says:
      Aug 2, 2017 at 11:52 pm

      Hi Carolina,

      You can change password using PHPMyAdmin.

      Reply
  34. DavidA says:
    Jul 25, 2017 at 2:40 pm

    Hi again,
    My sincere apologies! Posted a comment yesterday (July 24) re difficulty running the Duplicator program from my browser. Went back to check today and realised that I had made a mistake with the placement of the “test-site” folder which contained the installer.php and the zip archive database.

    Once I truly placed this folder in the htdocs folder then everything worked fine and I was able to install the website data locally as per your instructions.

    Thank you again for all your help!

    Reply
  35. DavidA says:
    Jul 24, 2017 at 8:19 pm

    Hi — thank you again for another great article! All very helpful!

    I am at the step of opening the Duplicator installer on my local computer. However when I put “http://localhost/test-site/installer.php” into my browser I get a “404 error message” saying “object not found”.

    Interestingly if I use “localhost” alone or “localhost/phpmyadmin” they both work. I have moved the “test-site” folder to the “htdocs” folder but still does not work.

    Any suggestions??
    Thank you

    Reply
  36. Shun says:
    May 10, 2017 at 11:49 am

    Thanks for this guide, but what if you’re migrating from a live site with an SSL cert down to a dev site without SSL (https to http?)

    I got the front-end working fine, however, HTTPS is still added to my wp-login URL, preventing me from accessing the login page into the admin.

    Any additional steps required to eliminating https on a local/dev site’s WP login page?

    Reply
    • simone says:
      May 25, 2017 at 2:09 pm

      I am having a similar issue. I migrated a live site to MAMP using WP Migrate DB plug in and FTP. I get the following error – due to the live sites SSL Certificate. It has something to do with the database prefixes not matching. But – I cannot change the prefix on the live site, I called Go Daddy to see if I edited the live site prefix to match my local install database prefix if it would break the site, they said no guarantees, I tried it and it broke the site.
      error message I get when entering localhost:8888 url.

      An error occurred during a connection to localhost:8888. The client has encountered bad data from the server. Error code: SSL_ERROR_BAD_SERVER
      The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
      Please contact the website owners to inform them of this problem.

      Thank you in advance for any help!

      Reply
    • xasmatic says:
      Jun 18, 2017 at 7:37 am

      Well, i used SSL certificate and that is what I did:
      At the step where you have to update the URLs inside your WordPress database referencing to your live site, you write the SQL query 4 times to change every URL that may exist.
      First time write code like above “http://www.example.com”, then “http://example.com”, after that “https://www.example.com” and finally “https://example.com”.
      Make sure: 1) that you write all four times the URL http://localhost/test-site which will replace those URLs
      2) change wp_options, wp_posts and wp_postmeta to your right ones (mine for example were cagwp_options etc.)

      And a last reminder: Finally (if you’re moving on localhost), on the last step you have also to change the host name to localhost (wp_config.php file)

      /** MySQL hostname */
      define(‘DB_HOST’, ‘localhost’);

      Reply
  37. Veer Abheek Singh Manhas says:
    Apr 22, 2017 at 3:44 am

    I am tried using this article but I am not sure at which point of time i am supposed to install wordpress. Can anyone help me here?

    Thanks

    Reply
    • AIAI says:
      May 27, 2017 at 6:12 am

      you don’t have to reinstall wordpress again. all files from the source wp installation is already backed up.

      Reply
  38. Alex says:
    Apr 11, 2017 at 1:18 pm

    I have used these instruction before and they worked fine, however i now have an updated version of mamp and wordpress and i continually get errors. betwen playing around i get the white blank screen or the index.php file. as text.

    Both similar problems to users below.

    it might be time to update this.

    I gave up on moving my site to local and decided to just have a dev url too however, when i run the sql query above i always end up with a token missmatch, despite making all the necessary changes.

    Reply
  39. Andi says:
    Mar 25, 2017 at 6:08 am

    Thank’S a lot for your work.

    But it doesn’t work. If I run local installer.php I see blank screen.

    Best regards
    Andi

    Reply
  40. mc says:
    Mar 3, 2017 at 6:45 pm

    hey

    I did everything as it is described and when I get to the last phase and put the url: localhost/mysite it automatically downloads a file that has this information:

    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . '/wp-blog-header.php' );

    is it something wrong that i did in the process?

    Reply
  41. Albert Smit says:
    Mar 3, 2017 at 8:15 am

    I wasn’t successful with the Duplicator plugin but managed to get my site sort of working the manual way.

    I now have another problem. My site opens up correctly but I am unable to do anything. I keep getting 404 Page not Found errors. This happens with my menu items, search bar, login button etc. I can go nowhere on my site. What do I do?

    Albert

    Reply
    • Matthew says:
      Jul 12, 2018 at 1:25 pm

      404 means the page is not found, sounds like you haven’t updated your database urls, be sure to follow that step. all your anchors are pointing to links that arn’t available on your server.

      Reply
  42. Albert Smit says:
    Mar 2, 2017 at 2:57 pm

    I have done the entire process from the zip file and install.php. In step 3, when I click on Save Permalinks, it takes me to the WP login screen. No matter what I type in, the result is always the same: Invalid Username. I have run this Duplicator twice now, still no luck. Please help.

    Albert

    Reply
  43. Richard says:
    Feb 20, 2017 at 5:27 pm

    Just wanted to say thanks for such a great and straightfoward description.

    I’d tried this a couple of times before using the info on wordpress.org but it never worked.

    Followed your article step by step (manual method, non-plugin) and it worked perfectly!!

    Thanks

    Reply
    • WPBeginner Support says:
      Feb 21, 2017 at 10:12 am

      Hey Richard,

      Glad you found it useful :) Don’t forget to join us on Twitter for more WordPress tips and tutorials.

      Reply
  44. LS says:
    Feb 20, 2017 at 2:51 pm

    Thank you very much for this tutorial!

    I did the manual install, although it didn’t quite do the trick at first. I got a Database Connection Error. Maybe most of you already know this, but i only saw it upon later glance:

    In my wp-config.php file, underneath the DB_NAME, DB_USER and DB_PASSWORD there was this line:

    /** MySQL hostname */
    define(‘DB_HOST’, ‘host.example.de’);

    I had to replace ‘host.example.de’ with ‘localhost’ to fix the issue. Now it works like a charm.

    Thank you again and i hope you have a fantastic day! ;-)

    Regards LS

    Reply
    • Abraham Quilca says:
      Jun 6, 2017 at 3:30 pm

      Yes, same here. That should definitely be updated in the article to save future viewers some time.

      Reply
  45. RF says:
    Feb 6, 2017 at 7:13 pm

    This website has saved my hide several times now. Keep it up!

    Reply
  46. Olivia says:
    Feb 6, 2017 at 1:10 pm

    Thank you!!!

    Reply
  47. Reese says:
    Jan 19, 2017 at 11:18 am

    Hello,

    I am receiving an error when reaching this step:

    “Now that your database is all set up, you need to update the URLs inside your WordPress database referencing to your live site. You can do this by running an SQL query in phpMyAdmin. Make sure you have selected your local site’s database and then click on SQL. In phpMyAdmin’s SQL screen copy and paste this code, make sure that you replace example.com with your live site’s URL and localhost/test-site with the local server URL of your site. ”

    The error is:
    #1146 – Table ‘rpd.wp_options’ doesn’t exist

    Please advise, thank you!

    Reply
  48. Martin says:
    Dec 12, 2016 at 4:24 am

    Thanks for all of your hard work. I’m a beginning web developer and your site is incredibly helpful.

    I have looked at both of your articles about migrating from local to live and vice versa. I built a WordPress site locally and used it to replace an existing HTML site. I then made changes to the live site, and I’m not quite sure how to go about “syncing” them again. What would you suggest?

    Reply
    • WPBeginner Support says:
      Dec 12, 2016 at 6:51 pm

      Hi Martin,

      Please take a look at our guide on setting up a staging environment.

      Reply
  49. James says:
    Dec 4, 2016 at 10:52 pm

    Thank you for the article, however i have still been having problems.

    One thing i don’t understand, is that you start of by recommending using backupbuddy (which i have been using to backup my sites) but then suddenly say to use this duplicator plugin.

    I have my full backup (with db) zip of my wordpress site which i created with backupbuddy and have unzipped it into its own folder in the “www” folder in wamp.

    I successfully create a new DB in PhpMyAdmin and then successfully imported my website db into it. I have also changed the config.php db name and password.

    However on the next step, trying to change the urls it comes back with:

    #1146 – Table ‘zexico.wp_options’ doesn’t exist
    #1146 – Table ‘zexico.wp_posts’ doesn’t exist
    #1146 – Table ‘zexico.wp_postmeta’ doesn’t exist

    What have i done wrong?
    thank you

    Reply
    • Ozi Diptongo says:
      Mar 8, 2017 at 10:28 pm

      Hi. I’m getting the same error. Were you able to fix it ? Than you !

      Reply
  50. Nina Chang says:
    Nov 24, 2016 at 5:42 pm

    Following on from my earlier comment – I fixed the problem! For some reason the duplicator plugin wasn’t copying across all of my database tables, which was causing the first round of issues – I sorted that by switching to the manual method. Then when I was running the queries in mysql I didn’t realise at first that I had to amend the names of the database tables as well (i.e. was just pasting wp_options when I needed to adapt that) – I’m not sure if this is normal as your lines of code only highlight the urls as needing to be corrected? THEN I had to deal with my strange wp-config.php file that had all the ‘database’, ‘host’, ‘username’ fields already filled in – after trying both options it only worked when I deleted the data that wordpress had already filled in and replaced it with the localhost data as directed. I don’t understand why my wp-config file had its fields already populated but then I’m a complete newbie to all this so I’m bound to have missed/misunderstood lots. Anyway – thanks again for the tutorial as it did FINALLY get me there!

    Reply
« 1 2 3

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
SeedProd Logo
SeedProd
Create beautiful custom landing pages - Drag & drop builder. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2020 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2020)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2020)
    • SiteGround Reviews from 4196 Users & Our Experts (2020)
    • Bluehost Review from Real Users + Performance Stats (2020)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2020 – Step by Step Guide
Deals & Coupons (view all)
PanKogut
PanKogut Coupon
Get 20% OFF on PanKogut's premium WordPress themes collection.
OptinMonster
OptinMonster Coupon
Save 10% off on OptinMonster, the best lead generation plugin for WordPress.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).
Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress CDN by MaxCDN | WordPress Security by Sucuri.