---
title: Migrate your LocalWP site to Pressable
url: "https://pressable.com/knowledgebase/migrate-your-localwp-site-to-pressable/"
published: 2023-09-26
modified: 2024-11-27
author: Wayne McWilliams
---

## Are you using [LocalWP](https://localwp.com/)?

Many migration plugins can make quick work of pushing your local site to production, but you have options if you’d rather do it yourself. This article details two other ways you can migrate your LocalWP site to Pressable:

- [Using SFTP ](#manual-migration-via-sftp)
- [Using SSH](#manual-migration-via-ssh)

## Migration via SFTP[](https://csfieldguide.wordpress.com/troubleshooting/migrations/manual-migrations/localwp-manual-migration/#manual-migration-via-sftp)

- **STEP 1**
    - Open your LocalWP app and **Export** the site.
        ![Screenshot from LocalWP](https://i0.wp.com/pressable.com/wp-content/uploads/2023/09/localwp-pressable-app-step1.webp?resize=1024%2C589&ssl=1)
    - Then, click the **Export Site** button.
        ![](https://i0.wp.com/pressable.com/wp-content/uploads/2023/09/Export-Button.jpg?resize=1024%2C713&ssl=1)
    - Save the file in .zip file format and save it in a location on your computer easy for you to find.
        ![screenshot showing export options](https://i0.wp.com/pressable.com/wp-content/uploads/2023/09/export-in-zip-format.png?resize=926%2C418&ssl=1)
- **STEP 2**
    - Extract or uncompress the exported zip file.
        ![Screenshot showing how to open the zip file](https://i0.wp.com/pressable.com/wp-content/uploads/2023/09/extracting-zip-file.png?resize=1024%2C98&ssl=1)
    - Once extracted, you will see the following directory structure.
        ![screenshot of export files](https://i0.wp.com/pressable.com/wp-content/uploads/2023/09/localwp-pressable-sftp-step2.png?ssl=1)
- **STEP 3**
    - Open the **/app** directory and you’ll see the following subdirectories.
        ![public and sql files](https://i0.wp.com/pressable.com/wp-content/uploads/2023/09/localwp-pressable-sftp-step3.png?ssl=1)
    - Open the **/public** directory and look for **/wp-content**. 
        Upload the contents of the /wp-content directory to the Pressable Server *`/srv/htdocs/wp-content/`* via [SFTP](https://pressable.com/knowledgebase/setup-and-use-sftp-to-connect-to-your-wordpress-site/).
- **STEP 4**
    - Import the SQL file inside the **/sql** directory via [phpMyAdmin](https://pressable.com/knowledgebase/access-phpmyadmin-with-wordpress/).
- ****STEP** 5**
    - In [phpMyAdmin](https://pressable.com/knowledgebase/access-phpmyadmin-with-wordpress/), change the **siteurl** and **home** url to the Pressable Staging URL
        ![screenshot of files in sql directory](https://i0.wp.com/pressable.com/wp-content/uploads/2023/09/Screenshot-2023-09-23-at-10.03.38-AM.png?resize=1024%2C206&ssl=1)
    - or use the following tool to generate the SQL query: [https://rudrastyh.com/sql-queries-to-change-wordpress-website-domain](https://href.li/?https://rudrastyh.com/sql-queries-to-change-wordpress-website-domain) and use the phpMyAdmin SQL query tool to run it.
        ![sql queries interface](https://i0.wp.com/pressable.com/wp-content/uploads/2023/09/Screenshot-2023-09-23-at-10.06.16-AM.png?resize=1024%2C500&ssl=1)

## Migration via SSH

- **STEP 1**
    - Click **Open site shell**
        ![](https://i0.wp.com/pressable.com/wp-content/uploads/2023/09/Screenshot-2023-09-23-at-10.10.20-AM.png?ssl=1)
        ![](https://i0.wp.com/pressable.com/wp-content/uploads/2024/06/open-shell-window.png?ssl=1)
- ****STEP** 2**
    - Navigate to **wp-content** to export the database:
        Execute the following command:
        `<em>cd wp-content</em><br></br><em>wp db export</em>`
        ![](https://i0.wp.com/pressable.com/wp-content/uploads/2024/06/export-database.png?ssl=1)
    - Then, execute `cd .. `(to go back to the site’s root directory.)
    - Compress the /wp-content directory in a .zip format. Execute the following command:
        *`zip -r wp-content.zip wp-content`*
- **STEP 3**
    - Copy the compressed file to the Pressable Server. Execute the following command:
        *`scp wp-content.zip atomic-ssh-url@ssh.pressable.com:/srv/htdocs`*
        
        `atomic-ssh-url@ssh.pressable.com` used above is the SSH URL for the site ([more information here](https://pressable.com/knowledgebase/connect-to-ssh-on-pressable/#get-ssh-credentials)).

   Note:  If you received an error saying “Connection closed by 192.0.96.181 port 22” [regenerate the SSH/SFTP password](https://pressable.com/knowledgebase/connect-to-ssh-on-pressable/#reset-an-ssh-password) and it should work: ![](https://i0.wp.com/pressable.com/wp-content/uploads/2024/06/Screenshot-2024-06-20-at-9.59.23%E2%80%AFAM.png?resize=1024%2C215&ssl=1)

 

 

 

 

- ****STEP** 4**
    - [SSH into the Pressable site](https://pressable.com/knowledgebase/connect-to-ssh-on-pressable/#connect-to-ssh) and then run the following commands: 
        - Unzip the wp-content:
            *`unzip wp-content.zip -d /srv/htdocs`*
        - Import the backup database:
            `<em>cd wp-content</em><br></br>`*`wp db import nameofthedatabase.sql`*
        - Run search-replace to update the database reference URL:
            `wp search-replace <localWPsiteDomain> <PressableStagingSiteURL> --all-tables`

            *example: `wp search-replace phoebiescupcakery.local  phoebiescupcakery.mystagingwebsite.com --all-tables`*
        - Clear cache:
            *`wp cache flush`*

You can also follow the instructions on our help article – [Manually Migrating Your WordPress Site to Pressable](https://pressable.com/knowledgebase/how-to-migrate-your-wordpress-site-to-pressable/#migrating-your-website-manually-using-ssh)[](https://csfieldguide.wordpress.com/troubleshooting/migrations/manual-migrations/localwp-manual-migration/#ssh-into-the-pressable-server)
