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
  • 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 November 11th, 2013 by Editorial Staff
108 Shares
Share
Tweet
Share
Pin
Special WordPress Hosting offer for WPBeginner Readers
How to Move a Live WordPress Site to Local Server

After learning how easy it is to install WordPress on local server in Windows or Mac, some of our beginner level readers asked us how they can move their live WordPress site to local server. We have previously showed you how to move a a WordPress site from local server to live site. This article is an exact opposite of that. In this article, we will show you how to move a live WordPress site to local server.

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

A lot of people create a copy of their live site on 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 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.

Important: Whether you are moving your WordPress site to a new domain, or from WordPress.com to self hosted WordPress, or to your localhost, it is highly recommended that you backup your entire website first. We recommend using BackupBuddy to create backups. You can also backup your site using BackWPUp, or create a manual backup.

Moving Live WordPress Site to Local Server using Plugin

First thing you need to do is install and activate the Duplicator plugin on your live site. Duplicator plugin allows you to create duplicate package of your entire WordPress site. 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.

Create a new package in the Duplicator plugin

To create a new package, you need to click on the create new package button. Duplicator will start creating a package of your entire WordPress site. This may take a while, depending on how much data you have on your live site. Once finished it will redirect you to the packages screen, showing newly created package with a installer file. To move your site you need to download both, the zip package, as well as the installer file to your computer.

Duplicator Zip Package and Installer file

Your local server site will need a new database, so you need to create a database on your local server using phpMyAdmin. Once you have created the database you need to copy paste the package and install file to an empty folder in your local server’s web directory. To run the installation script, you need to open the install file in your web browser. For example if you pasted both files in /test-site/ folder you will access them in your browser by visiting http://localhost/test-site/install.php. You will now see the Duplicator installation script like this:

Running duplicator install script on localserver

On this screen, you need to provide your local server’s database information. The host is usually the localhost. If you have not created a new user for MySQL on your site, then your username would be root. If you are using a password for the root user then enter that password, otherwise leave it blank. Lastly, you need to enter the database name you just created.

The installer will now extract your database and WordPress files from the zip package and import them. Depending on the size of package, this may take a while. Once the installer has extracted the files and imported database, it will redirect you to the update page.

Updating URLs in Duplicator plugin for WordPress

On the update page, you need to provide the URL of your live site and the URL of the site on your local server. The plugin will automatically detect these values make sure they are correct and then click on the update button. Duplicator plugin will now update URLs in your database.

Succesfully copied your live site to local server

That’s all, you have successfully moved your live site to local server. The installer will show you a success page. You would also need to update permalinks on your local server site and delete the installer file and package.

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 local server. The first thing you would need is to back up your website manually. We have a tutorial on how to backup your WordPress database manually. We recommend using phpMyAdmin to export your WordPress database.

To export your live site’s WordPress database, you need to log into your cPanel dashboard and click on phpMyAdmin. Inside phpMyAdmin you need to select the database you want to export and then click on the export tab on the top.

Export tab in phpMyAdmin

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.

Custom export options in phpMyAdmin

Once you have downloaded your database backup, the next step is to download your WordPress files. To do that you need to connect to your WordPress site using an FTP client like Filezilla. Download all your WordPress files and folder to your computer. Downloading all your files may take a while depending on how much data you have on your website.

Download all your WordPress files and folders through FTP

After downloading your WordPress files, if you downloaded all your files and not just the wp-content directory then simply copy paste these files in your local server folder where you want to install WordPress.

On your local server, you need to create a database for your WordPress site. To do that you need to open http://localhost/phpmyadmin/ in your web browser and create a new database. After creating the database click on the Import tab on top. On the next screen you need to click on the Choose File button to select the WordPress database export file you downloaded earlier, and then click on the Go button. phpMyAdmin will now import your database and will show you a success message when it is done.

Importing your database through phpMyAdmin

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.

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

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

The final step is to update your local site’s wp-config.php file. You need to go to the folder where you installed WordPress on your local server and open wp-config.php file in a text editor like Notepad. Replace database name with the one you created in phpMyAdmin on your localhost. Replace the username with your local mysql username, usually it is root. If you have set password for 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');

That’s all your live site is now copied to your local server, and you are ready to test drive it. We hope that you found this tutorial helpful. If you have any questions or feedback, then please leave a comment below.

108 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 Properly Move Your Blog from WordPress.com to WordPress.org

  • Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

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

210 Comments

Leave a Reply
  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. Sara says:
    Dec 14, 2017 at 9:16 am

    Hi

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

    Reply
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. RF says:
    Feb 6, 2017 at 7:13 pm

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

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

    Thank you!!!

    Reply
  34. 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
  35. 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
  36. 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
  37. 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
  38. Nina Chang says:
    Nov 24, 2016 at 5:59 am

    Hi there,

    Thanks for the tutorial. I’ve attempted to migrate my site with duplicator and it seems to work except I then can’t log-in to my locally hosted site – it doesn’t recognise my username at all. After the duplicator installed my files I had two config.php files – one config-sample.php and one config.php, and also two htaccess files – one .htaccess and one ORIG – could these doubled-up files have something to do with my login issues? I’ve tried every variation of deleting one of each pair, and I’ve also tried replacing my wp-login file and deleting plugins as I read elsewhere this might help, but nothing has worked. I redid the entire process from packaging and still no luck! I’ve also tried manually but got stuck at the mysql query updates. Do you have any idea where I’ve gone wrong??

    Many thanks!
    Nina

    Reply
  39. Susan Taunton says:
    Nov 17, 2016 at 2:58 pm

    I can’t tell you how grateful I am for this info. I have put an unbelievable amount of time into trying to get a live site onto my local server to no avail — and then I found your post today. Used the Duplicator and it WORKED!

    THANK YOU!!!!!!!!! :-))

    Reply
    • Editorial Staff says:
      Nov 17, 2016 at 3:25 pm

      You’re very welcome Susan :)

      Reply
  40. Dilip Pradhan says:
    Nov 3, 2016 at 8:14 am

    I have copied website from hosting domain to local host. everything is fine but all links of menu and all are redirected to
    how to solve it

    Reply
    • Byron Allen says:
      Mar 2, 2017 at 6:01 pm

      hi ,

      I had the same problem and just found the solution. I’m sure you’ve solved it by now but this might help others down the track.

      in WordPress admin area go to settings-> permalinks. Choose Post name.
      Your problems should be solved.

      Reply
  41. John Payne says:
    Oct 27, 2016 at 8:18 pm

    Thanks for all the excellent advice you give- it’s a wonderful service to the WordPress community.

    I’ve begun using the All-in-1 WP Migration plugin to easily backup my site , and later migrate it if necessary.

    It would also be good to be able to make changes to the sites on my own computer, checking them out before uploading updated files.

    I’, installing XAMPP on my computer. Is there an easy way I can use my All-in-1 WP Migration backup files with this?

    Any advice will be much appreciated.

    Reply
    • WPBeginner Support says:
      Oct 27, 2016 at 9:58 pm

      Hi John,

      Sorry but we haven’t tested this plugin. Please try contacting the plugin developers.

      Reply
  42. Andres says:
    Oct 23, 2016 at 11:13 am

    Great tutorial. Its important to mention that you need to delete the HTACCESS File in order to this to work.

    Thanks

    Reply
    • James orr says:
      Oct 27, 2016 at 2:09 pm

      From local site?

      Reply
      • Siddhartha says:
        Nov 22, 2016 at 2:24 pm

        Yes from the local site folder. I did that, and my site started working. However there are many other problems that I am facing even now. Like my category links are not working at all.

        Reply
  43. lohith says:
    Oct 6, 2016 at 4:59 am

    cool super clean tutorial, got mine to work without any issues.

    Reply
  44. Gokiko says:
    Oct 5, 2016 at 7:11 am

    Hi WPbeginner,

    I have followed all the instructions for manual moving. But I’m getting a “Oops! That page can’t be found.” error on the mainpage, none of the content can be viewed. And all the links in my localhost site direct to my online website.

    It seems only the the main structure of my site(theme, menus etc.) has been moved but all the rest is lost.

    Reply
    • WPBeginner Support says:
      Oct 5, 2016 at 10:11 am

      Is this error shown with your WordPress theme or on a blank white page? If it is shown on a blank white page, then this probably means that your WordPress site is not installed on the URL you are trying.

      Reply
      • Gokiko says:
        Oct 5, 2016 at 12:24 pm

        It shows on my WordPress theme. It also shows all my menus and content categories. But all the links take to the original websites address. Here is a screenshot if it’s gonna help:

        Reply
        • WPBeginner Support says:
          Oct 6, 2016 at 7:18 pm

          Try refreshing your site’s permalink structure. Go to Settings » Permalinks page and click on the save changes button without making any changes.

        • Juan says:
          Dec 1, 2016 at 7:50 am

          I have the exact same issue, but I can not log-in into my localhost using wp-admin or wp-login as it takes me to the live-site domain.

          Is there another way to login to my localhost/dev-site area to make this change? thanks in advance!

  45. Jason Hess says:
    Oct 3, 2016 at 1:06 am

    Dear WPBeginner,
    First of all, Thank you for all you do in the WP community, my question is hopefully a pretty simple one. (Famous last words huh?) Currently I use CLEF to log in to my “Live Site”. When I move my Live site to my Local server, will this create any issues when attempting to log in to the local site once the move has been completed? Or do I need to create a new log in PW for my site via the Dashboard in my Live site before making the move to a Local environment or will CLEF still continue to work on my “Local Server”?
    Also, do you all have any thoughts on using CLEF to log in? I’ve been using WP on and off for about 2 years and just want to get your opinion on CLEF.
    Thank you very much in advance! You guys rock! After I get my site up and running you can bet I’ll promote your site to everyone I know. I’ve learned so much already from your site and I’ve only been a member for 2 almost 3 months now.

    Have a great Day,
    Jason Hess

    Reply
    • WPBeginner Support says:
      Oct 3, 2016 at 1:53 am

      You can disable Clef at anytime once you have transferred your site to local server.

      Reply
  46. Mohd Amir says:
    Sep 26, 2016 at 5:02 am

    I forgot the password of filezilla, so I couldn’t download all the file of live site. I have backup of live site wp_content only. What can I do now for local server.

    Reply
  47. maarja says:
    Sep 3, 2016 at 2:56 pm

    Hi,

    Thank You for Your helpful directions.After a long while, I finally got the live page to my localhost with the plugin BUT for some reason, the content pages are not found on the server-all the information, texts etc is there in the back-office but aren’t shown in the front office except for the front page.
    Do You have any idea where/why the problem might occur?

    Thank You in advance,
    Maarja

    Reply
    • WPBeginner Support says:
      Sep 3, 2016 at 5:22 pm

      Try following the steps in our beginner’s guide to troubleshooting WordPress errors.

      Reply
  48. Yellow Canary says:
    Aug 30, 2016 at 10:15 pm

    Thank you very much :) I have done it manually… from a live server to localhost. With your instructions I have managed this for the first time. And I even know now how to do a SQL query in phpMyAdmin. I feel like a real pro!

    Reply
  49. amna says:
    Aug 25, 2016 at 3:14 am

    Hi,

    i followed all the steps but i am getting internal server error .

    I am confused in one step , after downloading the live site through filezill from godaddy host. i replace the wordpress folder with my live site folder i.e.

    C:/users/amna/wamp/www/wordpress/old folders

    with C:/users/amna/wamp/www/wordpress/mywebsite new folders

    please help i am a beginner

    Reply
  50. Debenkumar Naorem says:
    Aug 24, 2016 at 9:14 pm

    Hi WEBBIGINNER SUPPORT, I followed the instruction for manual, it works very fine. Thanks for such intructions, I’ve been looking for this. Thanks again.

    Reply
    • WPBeginner Support says:
      Aug 25, 2016 at 5:51 pm

      Hey Debenkumar, you are welcome. Don’t forget to join us Facebook for more WordPress tips and tutorials.

      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
WPForms Logo
WPForms
Drag & Drop WordPress Form Builder Plugin. 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]
    • 25 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 2019 (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 (2019)
    • 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 (2019)
    • SiteGround Reviews from 1032 Users & Our Experts (2019)
    • Bluehost Review from Real Users + Performance Stats (2019)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Start a Podcast with WordPress (Step by Step)
    • How to Choose the Best Domain Name (8 Tips and Tools)
    • How to Setup a Professional Email Address with Google Apps and Gmail
    • 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 2019 – Step by Step Guide
Deals & Coupons (view all)
Dreamhost
DreamHost Coupon
Get 40% OFF on DreamHost and get a Free Domain.
Elegant Themes
Elegant Themes Deal
Get all 87 amazingly beautiful WordPress themes by Elegant Themes for only $69. That is like $0.79 per theme!
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).

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • Awesome Motive

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

WordPress hosting by HostGator | WordPress CDN by MaxCDN | WordPress Security by Sucuri.