Is there a painless way to reset messages their related data?

What I mean is to delete everything and clean up data and start with a clean slate, somewhat like what TRUNCATE does to a MySQL table.

The reason I want to do this is to remove some bad data deliberately injected because of testing.

Any ideas?


To clean up message data, you will need to TRUNCATE following database tables:


You can run following SQLs:

TRUNCATE exp_message_attachments;
TRUNCATE exp_message_copies;
TRUNCATE exp_message_data;

Also, EE stores number of private messages within exp_members database table (column private_messages). So you will need to run this SQL:

UPDATE exp_members SET private_messages = 0

Please take a backup of database to avoid any other data problem.

Note: Anyone can see my same answer here also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.