[Prestashop tips] How to clean up Prestashop database for improved performance

Step 1: Backup all your Prestashop Database before improve it

Go to your PhpMyadmin on your hosting server, click your database name

clean-up-prestashop-database - 1

Click Export to export ALL prestashop database

clean-up-prestashop-database - 2

Choose Format = SQL, then click Go button

clean-up-prestashop-database - 3

Step 2: Delete connections statistics report: Execute SQL Query

TRUNCATE TABLE ps_connections;
TRUNCATE TABLE ps_connections_source;
TRUNCATE TABLE ps_connections_page;
TRUNCATE TABLE ps_guest;

Step 3: Delete Prestashop Logs: Execute SQL Query

TRUNCATE TABLE ps_log;

Step 4:  Delete Prestashop Referrer statistics report: Execute SQL Query

TRUNCATE TABLE ps_referrer;
TRUNCATE TABLE ps_referrer_shop;
TRUNCATE TABLE ps_referrer_cache;

Step 5: Delete page not found statistics report: Execute SQL Query

TRUNCATE TABLE ps_pagenotfound;

Step 6: Delete Prestashop Email logs report: Execute SQL Query

TRUNCATE TABLE ps_mail;

Step 7: Delete temporary images in a Prestashop website

Login with your FTP account or hosting account, delete all files in PRESTASHOP_ROOT/img/tmp

Step 8: Delete expired specific prices of products: Execute SQL Query

DELETE FROM ps_specific_price WHERE `to` != ‘0000-00-00 00:00:00’ AND `to` < NOW()
DELETE FROM ps_specific_price_rule WHERE `to` != ‘0000-00-00 00:00:00’ AND `to` < NOW()

Step 9: Delete Prestashop old search stats report: Execute SQL Query

TRUNCATE TABLE ps_statssearch;

Step 10: Delete Smarty Cache Database: Execute SQL Query

TRUNCATE TABLE ps_smarty_cache;
TRUNCATE TABLE ps_smarty_last_flush;
TRUNCATE TABLE ps_smarty_lazy_cache;

 

Related Articles

Leave a reply

You must be logged in to post a comment.