Regular Periodic Maintenance

What you should do to keep your store running well

This is a partial list of regular maintenance activities you should do on your store. You will want to to do these things between once a week and once a month, depending on how busy your store is.

Cleaning Up Disk Space

Periodically deleting from your website server all files that are no longer needed can go a long way to keeping your site running speedily and not triggering “out of disk space/quote” issues with your account.

It also makes your backups speedier and smaller, which helps both you and your customers and your hosting company.

Images and old backups are the biggest consumers of disk space.

Things to consider cleaning up:

  • ancient files in the /logs folder (you can use the Display Logs tool in Admin->Modules->Plugin Manager->Display Logs to purge log files)
  • temporary directories you’ve created for any reason, including temporary “backups” of old files or old directories as is often done when doing upgrades
  • database backups that you might have generated, including but not limited to those in the /admin/backups directory (see NOTE below)
  • old files in the /images directory and subdirectories such as for old products or wrong images you no longer use. These can take a lot of space.
  • no-longer-needed artwork uploaded by customers (when they placed an order) in the /images/uploads directory (see NOTE below)
  • ancient files in the /cache folder (see NOTE below)
  • ancient files in the /pub folder (see NOTE below)
  • no-longer needed files in the /download folder (see NOTE below)
  • old templates you no longer use, especially their images and javascript files
  • admin activity logs – should be exported via the Admin console and saved to your PC, and then the log reset via the Admin page. See the link in the section above.

NOTE: Any of these directories that contain a “.htaccess” or “index.php” or “index.html” or “index.htm” file should keep those htaccess and index files because their purpose is usually to prevent unauthorized access to all the other files in those same directories. So, don’t just delete the directory or everything in them. Keep these protective files as-is, and be sure to upgrade them between Zen Cart versions if changes have been made.

Also worth cleaning up, if you understand databases:

  • email archive history, if enabled, can consume a lot of disk space. If you have it enabled but never use it, turn it off and empty/truncate the email_archive table
  • payment module logs: if you’re using a payment module which logs all its activity into the database you might explore exporting that table and truncate/emptying it



Still have questions? Use the Search box in the upper right, or try the full list of FAQs. If you can't find it there, head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified January 15, 2024 by Scott C Wilson (6b377a48).