Getting Started with the Database Tools & Integrations

You are here:
Back

Table of Content

What is the Database Tools & Integrations module?
Configuring the External DB Add-On / Connecting to the External Database
Migrating the Audit Trail (including the alerts) from the WordPress Database to the External Database
Migrating the Audit Trail to the WordPress Database
Configuring Mirroring (Papertrail, Syslog)
Configuring Archiving of Alerts
Support and Related FAQs

What is the Database Tools & Integrations module?

This module in the WP Security Audit Log plugin allows you to:

  • Store the WordPress audit trail in an external MySQL database, rather than in the WordPress database.
  • Mirror the WordPress audit trial to Papertrial, Syslog or another MySQL database.
  • Configure an archiving database to archive old activity logs on an external database.
  • Ensure your WordPress websites meets legal and regulatory compliance requirements.
  • Improve the security of your WordPress website by segregating the WordPress audit trail from your website.
  • Boosting the performance of your website by segregating the audit log database queries from those needed to run the website.
  • Centralizing the logging of all your IT assets, including those of your WordPress website.

Configuring the External Database / Connecting to the External Database

This Getting Started guide will guide you through the process of configuring an external database and storing the WordPress audit trail in it. Similar to when you install WordPress, to store the WordPress audit trail in an external MySQL database configure the following:

Database Server Type: at the moment it is possible to store the WordPress audit trail in a MySQL server. In the future we will be supporting other database servers such as Microsoft SQL Server.

Database Name: specify the name of the MySQL database where the WordPress audit trail tables will be stored. Note that the database should be already created and the add-on does not automatically create the database.

Database User and Password: specify the credentials of the MySQL user that will be used to connect to the database. The user should have read and write privileges to the database.

Database Hostname: specify either the hostname, or FQDN or IP address of the remote MySQL server where the WordPress audit trail database is. If you are using a MySQL server that is installed on the same server where WordPress is installed specify either localhost or 127.0.0.1.

Database Base Prefix: specify the prefix for the table names. Similar to the WordPress database, the 2 tables where the WordPress audit trail is saved have a prefix and will be created automatically in the database upon configuring the plugin. The prefix of the audit trail tables does not need to be the same as that of the WordPress website. Note: different prefixes allow you to save the WordPress audit trail of several different WordPress websites on the same database.

Configuring the database connection details to store the WordPress audit trail in an external MySQL database

Switching to the External Database

Once you specify the connection details for the external MySQL database click the button Save & Test Changes so the WP Security Audit Log plugin connects to the database, automatically creates the new tables and starts writing the new alerts in the new WordPress audit trial. You can confirm the add-on has successfully connected to the external database from the Current Connection Details message, which is shown in the below screenshot.

Confirmation for the external database connection for the WordPress security audit log

Migrating Alerts from the WordPress Database to the External Database

If you would like to migrate the existing alerts from the old WordPress audit trail (the one stored on the same WordPress database) to the new audit trail stored on the non-WordPress external database click the Migrate Alerts from WordPress Database button.

Upon clicking the migrate button the alerts in the old WordPress audit trail will be copied to the new one and the plugin tables will be automatically deleted from the WordPress database. Refer to the WP Security Audit Log database documentation for more information on the tables the WP Security Audit Log plugin uses.

Migrating the Audit Trail to the WordPress Database

If for some reason you need to move the WordPress audit trail back to the WordPress database click the Switch to WordPress Database button. By doing so the Alerts will be moved from the external database WordPress audit trail to a new one in the WordPress database.

Mirroring Alerts to Papertrail or Syslog

You can also mirror (keep a copy) of all the alerts in the WordPress audit trail to Papertrail, Syslog or even to another MySQL database. To configure the mirroring options navigate to the Mirroring tab shown below and select the desired options. You can read the FAQ configuring Papertrail for more detailed information on how to configure it.

Mirroring the WordPress audit trail alerts to Papertrail or Syslog

Configuring Archiving of Alerts

You can archive some of the alerts from the main database to an external MySQL database. You should always archive some of the alerts to ensure that the main audit trail database remains fast. The Search, Report and the other add-ons will still work and can still retrieve data from the archiving database. To configure archiving, navigate to the Archiving tab, specify the Archiving Options and configure the database connection details.
Configuring the archiving options for the WordPress audit trail alerts

Support and Related FAQs

If you need support with the WP Security Audit Log plugin do not hesitate to get in touch. Refer to the below FAQs for more information about the functionality of the External DB & Integrations module.

How to store several WordPress audit trails from multiple WordPress websites in a one central database

How can you archive alerts to an archiving database?

How can I mirror the WordPress audit trail to Syslog?

How can I mirror the WordPress audit trail to Papertrail?