cleaning up after a Content Staging/Store deletion
-
16-10-2019 - |
Question
after trying to use content staging websites to no success and finding them buggy, we removed them.
I've noticed in the database, there are a lot of tables prefixed with s_ . I believe these tables were created when we creating new staging or store sites called Staging.
They are taking up a lot of room. Our DB is about 8GB and without the extra tables, it would be a bit under 2GB.
Is it safe to just go into phpMyAdmin and drop the tables?
I have tried this on a development server and everything seems ok but I am wondering if there are any gotchas I am not uncovering before I do it to the production database.
Thanks
Solution
If this is a production site, I would proceed with caution.
I would first back up the database
mysqldump -u [username] -p [db name] > db.backup.file.sql
I would then drop the tables, do testing on the site, and if everything is working as expected, then you are likely in the clear, however, if everything is not ok, then you will need to drop the database, create the database, and import the backup
mysql -u [username] -p -e "DROP DATABASE [db name]; CREATE DATABASE [db name];"
mysql -u [username] -p [db name] < db.backup.file.sql
Make sure the user you are using is capable of dropping and creating databases before proceeding.