How-To Fix A Corrupted RoundCube SQLite Database

Sometimes RoundCube will no longer allow users to access their webmail; it will show either the symptoms of a failed login or redirect to a login page if accessed from cPanel. Below shows you how to correct this issue should it happen.


Starting in this folder:


To restore to a previous version, either from the automatic copies made, or from a backup

  1. Rename the file <email_user>.rcube.db to <email_user>.rcube.db.bak or move it out of the folder
  2. Rename <email_user>.rcube.db.<number_stamp> (use the most recent copy first based on timestamp) to <email_user>.rcube.db
  3. Attempt to access RoundCube again

or to allow RoundCube to start from the beginning without attempting to restore any previous settings or contacts.

  1. Rename the file <email_user>.rcube.db to <email_user>.rcube.db.bak or move it out of the folder
  2. For servers running PHP-FPM for the cPanel service the service should be restarted
    • /scripts/restartsrv_cpanel_php_fpm --stop
    • /scripts/restartsrv_cpanel_php_fpm --start
  3. Attempt to access RoundCube again

Login to the account using either cPanel or and select RoundCube.

Your account should start working again.

Copies of your RoundCube database can also be found in any full cpmove backup under the following folder (you may need to open this file using your favorite archive utility.)

For more information on how to extract the files from an existing backup, please refer to the article below:

How to manually extract individual files from a cPanel backup with the tar utility

(cpmove-<user>.tar.gz) homedir/etc/<domain>/<user>rcube.db