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
- Create a new Snapshot backup of your account and website. How to create a snapshot backup
- Clear your PrestaShop Cache. It’s important to clear the cache to prevent any conflicts during the move.
- Log in to your PrestaShop admin panel.
- Navigate to Advanced Parameters > Performance.
- Under the Clear Cache section, click Clear Cache.
Step 2: Access cPanel and Open File Manager
- Log in to your Ecenica Dashboard
- Click Manage next your Ecenica hosting service.
- Click File Manager .
Step 3: Create the New Directory
- Once inside File Manager, click the +Folder button at the top left.
- 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
- Open to the public_html directory in File Manager
- In the right-hand pane, click Select All to select all files and folders.
- Move the Files:
- With all the files selected, click on the Move button in the top toolbar.
- In the dialog box that appears, change the file path from /public_html to the directory you created earlier. For example, /example.com
- Click Move Files to proceed.
Step 5: Remove the Domain Alias and add an Addon domain
- Follow our guide to Remove the existing Domain Alias
- 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.
- Log in to your PrestaShop admin panel.
- Navigate to Advanced Parameters > Performance.
- Under the Clear Cache section, click Clear Cache.
Step 7: Test the Site
- Visit your site to make sure everything is working correctly from the new directory.
- Check if all links, images, and functionalities are intact.