Forums  ›  General  ›  General discussions

Recycling a Site

I also thought the script generated a host of stuff in the config. I may try a reinstall and then do the modules I actually need. I'll report back.


There is no simple way to do it. You have to manually truncate each table.


The easiest way would be to get a list of tables via phpmyadmin.

Go into the database you want to clear in phpmyadmin and run sql query SHOW TABLES

Then copy and paste those table names into a text file and add TRUNCATE TABLE to the front of each table name then paste that into a sql query in phpmyadmin.

Unfortunately no command exists to truncate all the tables at once. So this is the only way.

However, certain tables will contain data that shows which modules are installed, so if the modules table for example is cleared, you would have to reinstall anyway.

So if it's ok for what your doing, you could just truncate the Profiles table and photos, blogs, forums, ect tables that have user data and leave the rest as is.

But a actual reinstall may be best.

EDIT. Crap. Just remembered, if you truncate the Profile table, you loose the admin account too.

I'd like to test my site with another project. It currently has a few hundred members, dozens of modules and dozens of hacks. 

Is there a simple way of emptying the data, or would it be best to delete the entire database, reinstall the script, then reinstall each of the modules?

I can't see why the latter wouldn't work, but it sounds like a big job.

Is there an easier solution?