Web Applications

How to move a PrestaShop site from public_html to a new directory

In this guide we explain how to move your PrestaShop site from public_html to an addon domain directory in cPanel, for example ‘example.com’. These steps will be useful if you plan to host a different website in your main public_html directory. Please note, these steps assume you are keeping the same URL for your website.

Steps to Move PrestaShop to a New Directory (with the same URL)

Step 1: Prepare for the Move

  1. Create a new Snapshot backup of your account and website. How to create a snapshot backup
  2. Clear your PrestaShop Cache. It’s important to clear the cache to prevent any conflicts during the move.
    1. Log in to your PrestaShop admin panel.
    2. Navigate to Advanced Parameters > Performance.
    3. Under the Clear Cache section, click Clear Cache.

Step 2: Access cPanel and Open File Manager

  1. Log in to your Ecenica Dashboard
  2. Click Manage next your Ecenica hosting service.
  3. Click File Manager .

Step 3: Create the New Directory

  1. Once inside File Manager, click the +Folder button at the top left.
  2. Name your new folder. For this guide, let’s call it example.com (or any other name you’d like for the folder).

Step 4: Move your PrestaShop Files to the New Directory

  1. Open to the public_html directory in File Manager
  2. In the right-hand pane, click Select All to select all files and folders.
  3. Move the Files:
    1. With all the files selected, click on the Move button in the top toolbar.
    2. In the dialog box that appears, change the file path from /public_html to the directory you created earlier. For example, /example.com
    3. Click Move Files to proceed.

Step 5: Remove the Domain Alias and add an Addon domain

  1. Follow our guide to Remove the existing Domain Alias
  2. Add your domain again by creating it as an Addon Domain.
    • When you create the addon domain ensure you set the Document Root to use the directory you moved your PrestaShop files to.

Step 6: Clear Cache again

After the move, it’s a good idea to clear PrestaShop’s cache from the admin panel again.

  1. Log in to your PrestaShop admin panel.
  2. Navigate to Advanced Parameters > Performance.
  3. Under the Clear Cache section, click Clear Cache.

Step 7: Test the Site

  1. Visit your site to make sure everything is working correctly from the new directory.
  2. Check if all links, images, and functionalities are intact.

Was this guide helpful?

Need help with this?

Open a ticket and link to this guide so our team can see what you have tried.

View support tickets

Power your business with Ecenica Hosting

Built for WordPress and serious websites. Fast, secure and supported by real people in the UK.

Ecenica hosting services represented by a connected red route across London