We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

delete old messages from sql? | Forum

Topic location: Forum home » Support » General Questions
Marcus
Marcus May 16 '19
How can I purge or delete let say a year old messages?
Oxwall Türkiye
Oxwall Türkiye May 22 '19

You can manually delete it from sql.

Check the Messages and notifications area.

In addition, you can do this by creating a plugin and using cron. (Recommended)

Marcus
Marcus May 22 '19
Thanks what tables should i delete data from?
Patricia Zorrilla Leader
Patricia Zorrilla May 22 '19

Do not erase them manually because you have the tables full of dead records and the orphan attachments.


I have a plugin that does this, it is currently in tests on my website.


If you want to do it manually, follow these steps:

1- decide from which date, for example 01/01/2019


2- pass this date to UNIX format, and many websites, for example https://www.epochconverter.com/


3- point the value in seconds, (not in milliseconds), in this example 1546304461


4- Go to your database and execute this:


DELETE FROM `ow_mailbox_message` WHERE` timeStamp` <1546304461


DELETE FROM `ow_mailbox_conversation` WHERE` createStamp` <1546304461


5- Then you go with the file manager of your server to this folder:

misite/ow_userfiles/plugins/mailbox/attachments/


6- Sort by date and delete all previous to that date


Marcus
Marcus May 22 '19
Welcome back buddy thanks.
Patricia Zorrilla Leader
Patricia Zorrilla May 22 '19

With this you will have dead records in other tables, but you will empty the two main ones.

I've used it for years, until I made the plugin that does it the right way, but until I have it tested, have the language file, installer and uninstaller and all this can not be put on sale


Marcus
Marcus May 23 '19
Thanks buddy keep me posted
Kenneth Parkes
Kenneth Parkes Nov 16 '22
Do not erase them manually How To Treat Gingivitis? Causes & Symptoms because you have the tables full of dead records and the orphan attachments. I have a plugin that does this.
RichardGravener
RichardGravener Nov 16 '22
Do not erase them manually garage floors Atlanta because you have the tables full of dead records and the orphan attachments. I have a plugin that does this.