• Hi,

    I have a live WP site which I need to transfer to my laptop so that I can continue working on it locally.

    I am following the 1st of the two methods described on this web page:

    https://www.wpbeginner.com/wp-tutorials/how-to-move-live-wordpress-site-to-local-server/

    I have broken the instructions down into 6 steps (see below).

    My problem is at Step 4. The instructions tell me to put the following address in a browser:

    https://localhost/test-site/install.php

    where /test-site/ is the location of the folder to which I copied the ‘package’ file and the ‘installer’ file referred to in Step 2.

    I copied those two files to a folder on the Desktop of my MacBookAir which I named ‘wordpress’.

    My question is: what would be the file path that I enter into my browser to run the installation script?

    Many thanks!
    Michael

    STEP 1
    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.

    STEP 2
    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.

    STEP 3
    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.

    STEP 4
    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 https://localhost/test-site/install.php. You will now see the Duplicator installation script like this:

    STEP 5
    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.

    STEP 6
    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.

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Are you using MAMP?

    Thread Starter msouthon

    (@msouthon)

    Yes, I use MAMP to create a site and then upload it to the server.

    You can’t place the WordPress files in a folder on your desktop and expect them to work. You need to move those files to a folder in MAMP (typically /Applications/MAMP/htdocs/).

    For instance if you create a folder called test in /Applications/MAMP/htdocs/ and place all the WordPress files there then you will be able to run the URL https://localhost/test/install.php in your browser.

    I hope this helps.

    Thread Starter msouthon

    (@msouthon)

    I thought it might be helpful to set out the exact steps I took to create a copy of the live WP site on my local machine. The process was unsuccessful so if anyone can see something I did wrong or something I omitted to do, I would be very grateful.

    Thanks in advance!

    The steps I took to transfer a live WP site to a local server

    STEP 1:

    Downloaded the entire ‘wordpress’ folder from the live site to my desktop (this includes sub-folders named ‘images’, ‘wp-admin’, ‘wp-content’, and ‘wp-inlcudes’)

    STEP 2:

    Downloaded the database from the live site to my desktop

    STEP 3:

    Opened the downloaded sql database and did a search and replace on the following:

    => find and replace: ‘www.wpm-temp.com’

    => with: ‘localhost:8888’

    STEP 4:

    Opened MAMP and went to ‘Preferences’ => ‘Web Server’ and set the ‘Document Root’ as the folder on my desktop where I saved the wordpress directory from the live site.

    STEP 5:

    Started the MAMP server and went to the ‘Start Page’ and clicked on ‘Tools’ => ‘phpMyAdmin’.

    In ‘phpMyAdmin’ created a new database (‘newgbdatabase’) and then imported into that newly created database the contents of the downloaded database.

    STEP 6:

    Opened wpconfig.php and changed the database name, the user name and the password, thus:

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'newgbdatabase');
    
    /** MySQL database username */
    define('DB_USER', 'root');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'root');

    STEP 7:

    Entered this address in the browser:

    https://localhost:8888/

    and pressed ‘Return’

    STEP 8:

    Received the following error message:

    “This webpage is not available”

    Try the My Website link on the MAMP WebStart page and see if that works.

    Double check that the WordPress address and site address both got changed to localhost.

    Make sure you have an index.php file in the root.

    If all that fails, try just putting a simple index.html file in your folder and see if that loads through MAMP. That will tell you if MAMP is at least pointed to the correct folder.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Transferring my WP site from live server to local server’ is closed to new replies.