This PHP script automatically adds indexes to your OpenCart database tables to improve query performance. It creates single-column indexes on columns ending with _id and some common fields, plus composite indexes on specific table-column sets.
- Place the script in your project root directory.
- Make sure your
config.phpis correctly set up to connect to your OpenCart database. - Run the script from the command line using
php indexer.php
Make sure to back up your database before running this script, as it will modify the schema by adding indexes.