Magento – How to Uninstall Magento Community Edition

magento-communityuninstall

I have Magento Community Edition installed on a shared hosting account. Is there a built-in uninstaller for Magento?
There's dozens of files / directories scattered throughout the root directory and I'd like to only get rid of the ones that are associated with Magento.

Best Answer

There is no built-in uninstaller for Magento.

If you followed best practices while developing Magento, all of your Magento-related files should be located under the same root folder in your filesystem, and all Magento-related database tables should be located in the same database.

If that's the case, uninstalling is as simple as deleting the files in the filesystem:

sudo rm -rf <magento root dir>

And dropping the database associated with Magento:

mysqladmin -u[username] -p[password] drop [database]

If you can't remember the name of the database your Magento installation uses, you can find that in app/etc/local.xml in the dbname node. You'll also find relevant login information there.

If you placed files or tables outside the bounds of Magento's root directory and database, you'll have to identify them and delete them manually.