Migrate your LocalWP site to Pressable

Last modified: November 27, 2024

Ask Your Favorite AI

Copy the link to a markdown format of this article for ChatGPT, Claude, Gemini, or your favorite AI.

Are you using LocalWP?

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:

Migration via SFTP

  • STEP 1
    • Open your LocalWP app and Export the site.
      Screenshot from LocalWP
    • Then, click the Export Site button.
    • 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
  • STEP 2
    • Extract or uncompress the exported zip file.
      Screenshot showing how to open the zip file
    • Once extracted, you will see the following directory structure.
      screenshot of export files
  • STEP 3
    • Open the /app directory and you’ll see the following subdirectories.
      public and sql files
    • 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.
  • STEP 4
    • Import the SQL file inside the /sql directory via phpMyAdmin.
  • STEP 5

Migration via SSH

  • STEP 1
    • Click Open site shell

  • STEP 2
    • Navigate to wp-content to export the database:
      Execute the following command:
      cd wp-content
      wp db export

    • 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).
  • STEP 4
    • SSH into the Pressable site and then run the following commands:
      • Unzip the wp-content:
        unzip wp-content.zip -d /srv/htdocs
      • Import the backup database:
        cd wp-content
        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