Forums  ›  General  ›  General discussions
 

Recycling a Site

You should also run that query i suggested to make sure the site does not try to send emails to those members addresses that their account was unregistered.

You will need to set EmailNotify back to 1 for the admin account after your done.

I am using the email service.

Thanks for the tips, but my concern in deleting from the database is that it will leave stuff in several modules I'm using such as: Classifieds, Blogs, Answers etc. As the delete from the dashboard seemed to work fine and posts in those modules also disappeared, I'll change the the unregistered setting as you suggest to avoid me being notified.

 

Thanks.

You should be able to just delete all of the members from the dashboard. And if using the forums, you may also need to delete some posts.

It should clear it out.

As for the single email each day. If your using that SMTP server i suggested to you earlier, my guess is they throttled your outbound limit and they are limiting the emails you can send. That's the problem with that free service. To avoid some of that, before deleting the members, turn off the option in admin moderation settings Enable notification about unregistered members.

You should also edit the database and run query UPDATE `Profiles` SET `EmailNotify` = '0'; and then clear the cache before you start deleting users and data. That should limit the number of outgoing emails that occur when you start deleting members and posts from the site.

I tried deleting profiles from  a cloned site, but probably went about it the wrong way. I went to the dashboard, selected 25 members and deleted them.

 

They disappeared okay and all looked normal, however for the next twenty days I received a single email stating that a person had deleted their profile. I'm up to day 20, so I guess I'll receive five more emails over the next five days.

 

I'm hoping that in deleting them that way, all data including posts to 3rd party modules have also gone.

 

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.

TRUNCATE TABLE table_name

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?