Move Live WordPress Site to Local Server Using Local by Flywheel

We were using MAMP for installing WordPress on local server and for copying live WordPress site to desktop for many years. Initially MAMP was only used on MAC but later they also released Windows version making no need of going to WAMP. Recently we came across another option “Local by Flywheel”. As the name indicates this is software released by Flywheel hosting company. Basically this is a marketing piece from them to help their customer to build and publish sites from local to live server.

But the app allows anyone to install WordPress locally within few minutes. Though you need to spend similar effort like MAMP to move your complete live site to Local by Flywheel app.

Move Live WordPress Site to Local Server Using Local by Flywheel

Here are the step by step processes to move your live WordPress site local server using Local by Flywheel app. We have provided the time consuming steps first so that you can carry on to further steps while previous steps are in progress.

  1. Use FTP to download all your site files
  2. Download your SQL database dump from phpMyAdmin
  3. Download Local by Flywheel app
  4. Install Local by Flywheel app on your computer
  5. Create a new site
  6. Setup WordPress
  7. Check local WordPress site
  8. Replace the files with your live site files in “Local Sites” folder
  9. Upload live SQL database using Adminer
  10. Update local site’s details
  11. Launch your live site on localhost

Let us discuss each step in detail in the following sections.

1. Download Live Site Files

One of the big differences in Local by Flywheel is that you don’t need to have WordPress installation files. The app by default has the latest WordPress installation package.

Go to your FTP client and connect to your live server. Start downloading all site files to your local PC or Mac. This may take long time depending on the size of your site. If you need, request your hosting company to send you the backup of site files.

2. Download SQL Database Dump

Local by Flywheel has two option to upload database – Adminer and Sequel Pro. We will explain Adminer in this article since it is similar to phpMyAdmin on your hosting account.

Login to your hosting account and navigate to cPanel. Go to the phpMyadmin section and download the live database file to your local computer. Ensure to download the file in GZIP compressed format and the file name should be end with “.sql.gz”.

Now that you have the database and site files, let us move on to the Local by Flywheel app. You can learn more in a separate article about downloading WordPress backup manually.

Learn WordPress: Check out 300+ free WordPress tutorials.

3. Download Local by Flywheel App

Go to the Flywheel website and click on the download button. This is almost 500MB app hence will take some time to download depending on your Internet speed. Fill out the details, choose Mac or Widows version and download the app.

Download Local by Flywheel App
Download Local by Flywheel App

4. Install Local by Flywheel App

Once downloaded the app, double click on it and follow the instructions to install it on your PC or Mac. The app will try to install three components – virtual box, host machine and local image.

Local by Flywheel App Installation
Local by Flywheel App Installation

During installation process, we have encounter the security problem on Mac. You should allow the app in “Security & Privacy” settings and proceed with the installation.

Allow Downloaded App to Install in Mac
Allow Downloaded App to Install in Mac

5. Create a New Site

Launch the app after successful installation and click on the “+ Create New Site” button.

Create New Site in Local by Flywheel App
Create New Site in Local by Flywheel App

Enter the site details and click on “Continue”. The app will automatically take the local site domain as “yoursitename.local” and stores all content under “~/Local Sites/yoursitename” folder. At this point, leave the blueprint option as it is. After first site is created, you can use the first site as blueprint to create further sites. So it is not useful during first site creation.

Provide Site Details
Provide Site Details  

The next step is to choose the environment for WordPress installation. Select the “Preferred” tab and the app will automatically determine the PHP and MySQL version. The web server is generally “nginx + Varnish”.

Choose Environment for Installation
Choose Environment for Installation

Preferred options are the recommended environment by the app. Alternatively you can go to the “Custom” tab and choose the PHP, server and MySQL options on your own. This needs additional download of 220MB files and connecting to Flywheel server is not supported with custom options.

Choosing Custom Environment
Choosing Custom Environment

So go ahead with preferred options and click “Continue” button.

The last step in creating a new site is to setup WordPress. Fill the form with your WordPress username, password and email id; you can delete the default email id generated by the app. The advanced option allows you to setup WordPress multisite. So, if you need a multisite installation, ensure to select “Yes” for multisite.

Enter WordPress Setup Detail
Enter WordPress Setup Detail

On next screen, you can save the admin details entered for this site as default for the app.

Setting Up Default Admin
Setting Up Default Admin

6. Check Local WordPress Site

Now you have successfully installed WordPress on your local computer. Ensure the link “Start Site” on top right corner of the app is showing as green, this indicates the site is running. Click on the “View Site” button to view the WordPress site with your local URL like “yoursitename.local”. You can also login to the WordPress admin panel by clicking on the “Admin” button.

WordPress Installed Successfully
WordPress Installed Successfully

There are many options available in the app which you can navigate and learn yourself. For example, click on the “Trusted” button under “SSL” tab to have a HTTPS connection on your local site. Let us focus on our next task that is replacing the default WordPress site’s content with your live content from steps 1 & 2.

Note: We have noticed, the application was still lying under “Downloads” folder on Mac. You may need to move the “Local by Flywheel” app to “Application” folder manually.

7. Replace Files with Your Live Site Files

The Local by Flywheel app stores all site files under “Local Sites” folder. So navigate to “Macintosh HD > Users > Your Mac User Name > Local Sites > Your Site Name > app > public”. You should find the files under similar path in Windows app.

Accessing Local Site Files
Accessing Local Site Files

Just delete the entire site files under “public” folder and move your live site’s files downloaded in step 1.

8. Upload Live SQL Database Using Adminer

The Local by Flywheel app allows two options for uploading database – Adminer and Sequel Pro. Ensure your site is running in the app and then click on the “Adminer” option from the app under “Database” tab. This will open the screen on browser similar to phpMyAdmin.

Delete All Tables from Local Database

Select all tables from “Local” database and click on “Drop” button to delete them. Now the “Local” database is empty. Click on the “Import” button and upload the live site’s database downloaded from step 2.

Upload Live Site's Database File in Local Site
Upload Live Site’s Database File in Local Site

Database file upload should work for smaller database files. In our case we get the memory exhausted error due to the large file size. In such case, extract the live site’s gzipped database file to a .sql file and move under “Local Sites > app” folder. Go to the “Local by Flywheel” app and right click on your sitename. Select the option “Open Site SSH”.

Open Local Site SSH
Open Local Site SSH

This will open the command prompt and enter the following command:

mysql -u root -proot local < /app/databasefile.sql

Ensure to replace “databasefile.sql “ with the name of your database file uploaded under “Local Sites > app” folder. This command will show a warning and may take a while. After that navigate to “Local Sites > app” folder and check there is a new folder named “sql” is created containing all the database tables.

SEO Offer: Get special 14 days free trial with SEMrush to analyze your site.

9. Replace Live Site URL with Local URLs

Now that, you have uploaded the live site’s database file successfully to local site. But when you launch the site, it may still show error establishing database connection error or it will connect to your live site. Go to “Adminer” and click on the “SQL command” link. Paste the below query to replace your live site’s URL to local site URL:

UPDATE wp_options SET option_value = replace(option_value, '', 'http://yoursitename.local') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, '', 'http://yoursitename.local');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'','http://yoursitename.local');

Remember to replace “yoursitename” with your site name and use correct table prefix (we have used the default prefix as wp_).

10. Update Local Site’s Details

The last step is to replace the database name in the local site’s “wp-config.php” file. Go to “Local Sites > app > public” folder and open “wp-config.php” file. Change the database name from live site database to local like below with other details for localhost:

define('DB_NAME', 'local');
define('DB_USER', 'root);
define('DB_PASSWORD', 'root');
define('DB_HOST', 'localhost');

11. Launch Live Site on Localhost

Everything is set now!!! Go to the “Local by Flywheel” app and ensure the site is running. Click on the view site button to launch the local copy of your live site with the URL “yoursitename.local”. You can login to admin dashboard and start editing the local site.

Open Local Site from Local by Flywheel
Open Local Site from Local by Flywheel

Remember, you may need to adjust sidebar and footer settings, as they might not be copied from the live site. Also plugins like Jetpack will ask you to run in safe mode on local site. After finished activities logout from the admin panel, stop the site in Local by Flywheel app and then quit the app.

Editorial Staff at WebNots are team members who love to build websites and share the learning with webmasters community. Follow us on Facebook and Twitter.

18 thoughts on “Move Live WordPress Site to Local Server Using Local by Flywheel”

Leave your response.

  1. I have plugins that are necessary and seem to maybe be causing an issue. For example, when I view site, I’m getting a `Warning:require(Users/username/LocalSites/app/wp-content/plugins/plugin-name”:failed to open stream:No such file or directory in Users/username/LocalSites/app/wp-content/plugins/plugin-name on line 189.

    Any idea where I’m making a mistake or could it be because these plugins are licensed?

  2. I applied all the steps in the tutorial , but when i run the site , it shows me the installation of wordpress, it is like i haven’t done anything , what should i do ?

  3. Hey there!

    Thanks for this article.. but I am having a problem. There is no longer the “adminer” option under the “database” and it looks like the only option is to use Sequel Pro (unless I am missing something).

    This is fine, and I’ve downloaded Sequel Pro and have attempted opening my local installation to migrate the PHP files, however I get an error that says:

    Sequel Pro has encountered an unexpected error:

    -[_NSInlineData isEqualToString:]: unrecognized selector sent to instance 0x604000227d00

    Can you point me in the right direction to use “adminer” or confirm that this is no longer an option and update the post using the Sequel pro option?


  4. Hello,

    thanks for your helpful post.
    I just want to add that in step 10 it will be needed to replace the table prefix in “wp-config.php” file as well (if it was not the default prefix wp_ used).

  5. Hello. If I enforce n SSL certificate for my local site in Local by Flywheel, then in step 9, Replacing Live Site URL with Local URLs, do I have to add https?
    For example:
    UPDATE wp_options SET option_value = replace(option_value, ‘’, ‘https://yoursitename.local’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
    UPDATE wp_posts SET post_content = replace(post_content, ‘’, ‘https://yoursitename.local’);
    UPDATE wp_postmeta SET meta_value = replace(meta_value,’’,’https://yoursitename.local’);

  6. Thanks so much, this was a very timely and helpful how-to, as I was just wondering how to move my sites from my Bitami local server to local by flywheel

  7. Nice tutorial but step 9 and 10 have some issues. In step 9 the url of your local site is not ‘http://yoursitename/local’ but ‘http://yoursitename.local’.

    Step 10 is incomplete. It’s not enough to update the name of the db in the “wp-config.php” file. You have to edit DB_USER, DB_PASSWORD and DB_HOST as well in the following way:

    define(‘DB_USER’, ‘root’);
    define(‘DB_PASSWORD’, ‘root’);
    define(‘DB_HOST’, ‘localhost’);

    Maybe this additional info it will help someone.

  8. Steps 9 and 10 here refer to entering text ‘below’ but do not specify what this text is, which makes these instructions impossible to complete. Any chance you could look at 9 and 10 again and add in whatever is missing. I’ve followed this far but the new site on local only ‘links to’ the actual live site and I cannot get to the Local site or into its Admin area. Soooo frustrating. Thanks


Leave a Comment