PrestaCraft on Facebook

Please like our page on Facebook to get notifications about new tutorials :)


PrestaCraft

Tutorials

That task is quite easy in most cases. But you must remember about few essential things.

Moving from SERVER to LOCAL PC

I assume you’ve configured PHP, Apache and MySQL on your local machine. If you don’t have those things installed, find some informations about how to do it. If you are using Windows I can suggest you installing XAMPP application.

Download all website files from your FTP and put them to the local directory.

Next, let’s export the database from phpMyAdmin to the .sql file and download it. Import that file to your local database.

Now it’s a time to make some changes in your local database, files and BackOffice.

Database:

1. Go to the table PS_SHOP_URL and change values of following columns:
domain localhost
domain_ssl localhost
– If your PrestaShop is located in some addictional directory, set the value of physical_uri (for example, if it’s in the ‘shop’ directory, write /shop/ there)
2. In the PS_CONFIGURATION table change the value of PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL

Files:

1. Set the debug mode ON in config/defines.inc.php

2. Set your local database parameters in config/settings.inc.php

3. If your PrestaShop is located in some addictional directory (for example /shop/), edit the .htaccess file. It’s located in PrestaShop main folder. Add to this part…

…that directory. Complete code should look like this:

BackOffice:

Advanced Parameters -> Performance
Select “Force compilation” in smarty settings, disable the cache and clear the cache using button located in upper right header of page.

Moving from LOCAL PC to SERVER

You must execute some very similiar steps to those above.

Upload your local files to the FTP server.

Export your local database to the .sql file. Next, import that file to your server phpMyAdmin.

Now it’s a time to make some changes in your local database, files and BackOffice.

Database:

1. Go to the table PS_SHOP_URL and change values of following columns:
domain Your URL
domain_ssl Your URL
– If your PrestaShop is located in some addictional directory, set the value of physical_uri (for example, if it’s in the ‘shop’ directory, write /shop/ there)
2. In the PS_CONFIGURATION table change the value of PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL

Files:

1. Disable debug mode in config/defines.inc.php

2. Set your production database parameters in config/settings.inc.php

3. If your PrestaShop is located in some addictional directory (for example /shop/), edit the .htaccess file. It’s located in PrestaShop main folder. Add to this part…

…that directory. Complete code should look like this:

BackOffice:

Advanced Parameters -> Performance
Select first or second option (“Never recompile template files” or “Recompile templates if the files have been updated” in smarty settings, enable the cache and clear the cache using button located in upper right header of page.

You should also regenerate .htaccess file. You can do this in Preferences -> SEO & URLs. Select unselected option near field Friendly URL and save the changes. Of course, you can restore the previous value of field now.

Add a comment

Leave a comment

Your email address will not be published.