Skip to content

Push the Local WordPress site to InstaWP ​

You can copy an existing local WordPress website, including its files and database, to a new site on InstaWP using InstaCLI. This works for any locally developed site (LocalWP, XAMPP, MAMP or WAMP), and the whole migration runs from a terminal opened at your site's root folder.

The steps below use LocalWP as the example. If you don't have a local site yet, start with Create a site in LocalWP.

Let's get started 🚀

Before you start ​

You need:

  • Node.js 18 or higher, which InstaCLI requires
  • npm
  • mysqldump available on your PATH, used to export the local database
  • An InstaWP account on a paid plan

Create a site in LocalWP ​

Skip this if your local site already exists.

LocalWP sets up a WordPress development environment on your computer. It creates a database and installs WordPress with the default themes and plugins.

Step 1: Go to the Local dashboard, select Create a new site, and click Continue.

Step 2: Name your site and click Continue.

Step 3: Choose the preferred environment, or set up a custom one for your site.

Step 4: Set a username and password for your site and click Add Site.

LocalWP creates your local site.

1. Start the local website ​

Open LocalWP, select your site, and click Start site if it isn't already running. Open the site in a browser to confirm what you're about to transfer.

In this example the local URL is http://dummysiteforinstawp.local/.

LocalWP showing the selected site running, with the Site shell and WP Admin options

2. Open the site's terminal ​

In LocalWP, click Site shell (visible next to Site folder in the screenshot above).

The terminal opens in your WordPress root folder, for example:

C:\Users\<your-user>\Local Sites\dummysiteforinstawp\app\public

That folder contains wp-config.php, wp-content and the rest of the WordPress files. Keep the site running for the whole migration.

Other local stacks

For XAMPP, WAMP or MAMP, open Command Prompt / PowerShell / Terminal and cd into the site's folder yourself (C:\xampp\htdocs\mysite, C:\wamp64\www\mysite, /Applications/MAMP/htdocs/mysite). The site root is the directory containing wp-includes/version.php.

3. Check the prerequisites ​

Run these one at a time:

bash
node --version
npm --version
mysqldump --version

Each should print a version number. If a command isn't recognised, install that prerequisite before continuing.

4. Install InstaCLI ​

bash
npm install -g @instawp/cli@beta

When it finishes, verify it:

bash
instawp --version

If InstaCLI is already installed, skip the install step.

5. Log in to InstaWP ​

bash
instawp login

Complete the login in the browser window that opens, then return to the terminal and confirm the connected account:

bash
instawp whoami

Make sure this is the account you want the cloud site created in.

Terminal showing node, npm and InstaCLI version checks followed by a successful instawp login

6. Preview the migration ​

Run the push with --dry-run first:

bash
instawp migrate push . --name dummysite-cloud --source-url http://dummysiteforinstawp.local/ --dry-run
PartWhat it does
instawp migrate pushMigrates an existing local WordPress installation to a new InstaWP site
.Uses the current folder as the WordPress source
--name dummysite-cloudSets the new cloud site's name
--source-urlSpecifies the local website's URL
--dry-runShows the migration plan without creating or uploading anything

Check that the preview shows the correct WordPress root, source domain and destination name. A successful preview does not guarantee the database export will succeed.

Dry-run output listing the WP root, source domain, WP version, database export method, new site name and excluded folders

7. Run the migration ​

Remove --dry-run and run it for real:

bash
instawp migrate push . --name dummysite-cloud --source-url http://dummysiteforinstawp.local/

Keep the terminal open. InstaCLI will:

  1. Archive the website files and export the database.
  2. Create the hosted site and prepare SSH access.
  3. Upload the archives and restore the website.
  4. Check that the cloud site responds.

Wait for Migration complete and the website links.

Terminal output showing each migration step completed, ending with Migration complete and the Site URL and WP Admin links

8. Open and verify the cloud website ​

Click the Site URL printed in the terminal, then open the WP Admin link and log in with your existing local WordPress admin credentials. Your users were migrated along with the site.

Check the homepage, a few internal pages, images, menus, and any important forms or functionality.

Your local site is now live on InstaWP, and the new site appears on the Sites page of your dashboard.

The InstaWP dashboard Sites page listing the newly migrated site on the Sandbox plan

The new site starts on the Sandbox plan

By default the migrated site is created on the Sandbox plan, which is meant for development and testing. For production hosting, change the site's plan to a higher tier from the Sites page. See Upgrade Site Plans for the steps, and Site Plans for what each tier includes.

To migrate another website, replace the source URL and cloud site name, and run the commands from that site's own Site shell.

Why this works from localhost ​

A local site has no public address, so nothing on the internet can reach into it, which is normally what makes moving a local site to a host awkward.

InstaCLI sidesteps that. It makes an outbound connection from your machine to InstaWP and uploads the archives, the same direction as any other request your computer makes. Nothing has to connect in to your machine, so you do not need a public URL, a tunnel (ngrok, Cloudflare Tunnel), or any port forwarding or firewall change.

| 💡 Did you know - You can also go the other way: export a site from InstaWP and import it into LocalWP. Learn how.

| 💡 Did you know - Your staging site's content can be downloaded into a zip file that you can then import to another WordPress site or host. Learn about Export your staging site.

Docs are open. Edit them on GitHub. Built with VitePress.