Identify the Extension
First, confirm that the W3Speedster extension is installed by checking the Magento extension list:
php bin/magento module:status
Look for an entry like W3Speedster_W3Speedster (or similar). This confirms the extension is installed and enabled.
Disable the Extension
To prepare for uninstallation, disable the extension:
php bin/magento module:disable W3Speedster_W3Speedster
- Replace W3Speedster_W3Speedster with the actual module name if it differs.
- This command prevents Magento from loading the extension’s files.
Unregister the Extension
Remove the extension from the system using the composer command. Depending on how the extension was installed, the process differs:
If Installed via Composer:
Remove the extension with Composer:
composer remove w3speedster/w3speedster
This removes the package files and updates the composer.json and composer.lock files.
Regenerate the autoloader:
composer dump-autoload
If Installed Manually (from a ZIP file or manually placed in app/code):
Delete the module files from app/code:
rm -rf app/code/W3Speedster/W3Speedster
Ensure no residual files are left in the codebase.
Remove Data from Database
If the extension added database changes, such as tables, fields, or configuration settings, clean them up:
Run the setup:upgrade Command:
php bin/magento setup:upgrade
This command ensures the database schema is updated to exclude the removed extension.
Manually Clean the Database (if needed): Check for tables, rows, or configuration entries added by the extension. Common places to look:
- Custom tables (e.g., w3speedster_*).
- core_config_data table for configuration entries.
Example SQL query to remove extension-specific entries:
DELETE FROM core_config_data WHERE path LIKE 'w3speedster/%';
Clear Cache
Clear the Magento cache to ensure no references to the extension remain:
php bin/magento cache:clean
php bin/magento cache:flush
Verify Uninstallation
Check the Module Status:
php bin/magento module:status
Ensure the W3Speedster_W3Speedster module is no longer listed.
Test the Application:
- Verify that your Magento store is functioning correctly.
- Ensure there are no errors related to the W3Speedster module.