Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+6 votes
in Plugins by

Question2Answer q2apro Archive Before Delete


This is a plugin for Question2Answer that makes a copy of the deleted post before deleting it from the main posts table. In other words, you will not lose this content anymore but find a copy in an extra table qa_posts_archive.

Download: https://github.com/q2apro/q2apro-archive-before-delete


  1. Install Question2Answer
  2. Get the source code for this plugin directly from github
  3. Extract the files.
  4. Change language strings if needed.
  5. Upload the files to a subfolder called q2apro-archive-before-delete inside the qa-plugin folder of your Q2A installation.
  6. Navigate to your site, go to Admin -> Plugins on your q2a install. You will see the notice: 'The module requires some database initialization.'
  7. Click on database initialization. Then click button Install.
  8. The MySql table 'qa_posts_archive' will be created. Notice appears: The module has completed database initialization.
  9. You are done!
  10. Test the functionality by creating a post and deleting it again. Open phpmyadmin and check the table qa_posts_archive for content!


This is beta code. It is probably okay for production environments, but may not work exactly as expected. You bear the risk. Refunds will not be given!

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


All code herein is OpenSource. Feel free to build upon it and share with the world.

About q2a

Question2Answer is a free and open source platform for Q&A sites. For more information, visit: www.question2answer.org

Final Note

If you use the plugin:

  • Consider joining the Question2Answer-Forum, answer some questions or write your own plugin!
  • You can use the code of this plugin to learn more about q2a-plugins. It is commented code.
Q2A version: 1.7
Nice plugin! keep up the good work!

Please log in or register to answer this question.