Prestashop: Setting your new site live

April 6, 2021

This is a companion blog to my previous The Changing of the URL blog post. I’ll be covering the scenario where you’re moving a site that you’ve developed in some hidden corner and now it’s ready for its public debut.

Ideally, you’ll have a hosting package that has plenty of space and allows you more than one database so if anything goes terribly wrong you’ll be able quickly and easily to back out.

Prestashop 1.7 Series

The basic steps are these:

  1. Put both sites under maintenance
  2. Rename the web directory to something like “new_site”
  3. Zip, Tar or otherwise bundle up the web directory of the development site
  4. Copy the zipped development site to the production server and unzip it so it appears in the base directory as new_site
  5. Dump the development site database
  6. Create a new database and database user on the production site.
  7. Import the development database to the new production database
  8. Assuming you have phpAdmin follow these steps:
    Create a query SELECT * FROM `ps_configuration` WHERE name like '%PS_SHOP_DOMAIN%'
    You should get two results, one plain and one for SSL. Change the value field(s) to your testing URL.
  9. While you’re there check out any results from this query:
    SELECT * FROM `ps_configuration` WHERE name like '%your.dev.domain%'
    (obviously use your real dev domain there!) Change any instances of your.dev.domain to your.production.domain.
  10. Now navigate to the imported dev site and edit /app/config/parameters.php and change those settings to the new database and user that you created when you imported the data from the dev site.
  11. Take a deep breath - we’re almost there!
  12. Using the file manager go to the/var/cache directory of the new site and empty out both the prod amd (if it exists) the dev directory.
  13. In the root directory of your hosting account rename public_html to something like “old_site”. Rename “new_site” to public_html.
  14. Use your browser to visit your website. If all’s well you should see the “Site under maintenance” for the new website.
  15. Log in to your admin (of the new site) check that your IP is enabled in the maintenance section so you’ll be able to give the site a good going over before it’s taken out of maintenance and the public are allowed to see it. Always a good idea to go to Advanced Parameters and clear the cache there.
  16. When you’re satisfied that everything is working as it should, take the site out of maintenance and congratulate yourself on a job well done!

If all that sounds like a nightmare then why not contact me for fast, friendly and surprisingly affordable migration assistance.

Take Careā„¢