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
Configuring SSL and client certificate for the external database
Migrating the activity log from the WordPress Database to the External Database
Migrating the Audit Trail to the WordPress Database
Configuring Mirroring (Papertrail, Syslog)
Configuring Archiving of the WordPress activity log events
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

Configuring an external database for the WordPress activity log

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 activity log of several WordPress websites on a central database.

For the database prefix you also have the option to use the website’s URL as table prefix. Therefore if your website URL is https://www.wpsecurityauditlog.com, the table’s prefix will be www_wpsecurityauditlog_com_.

Use Buffer: when you enable this option the WordPress activity log events are first sent to a buffer on the WordPress database and every ten minutes they are sent to the external database. By sending the events to a buffer first you ensure that the website’s performance is not hindered by the status of the connection to the external database. Therefore it is recommended to enable this option if the connection to the external database is not stable or slow.

Configuring a SSL and Certificate for the External Database

The default connection to MySQL is not encrypted, therefore all the data is sent over in clear text. If your MySQSL server supports SSL, you can encrypt the communication between your WordPress website and the MySQL server where the external database is by enabling the option Enable to use SSL to connect with the MySQL server.

Configuring SSL and client certificates for the WordPress activity log external database
If you have a Client Certificate for your WordPress website MySQL connection enable the Client Certificate options and configure the paths to the CA SSL certificate, Server SSL certificate and client certificate. Once setup and the settings are saved the plugin will use the client certificate to communicate with the external 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 events 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 Events from the WordPress Database to the External Database

If you would like to migrate the existing events 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 Events from WordPress Database button.

Upon clicking the migrate button the events 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 events will be moved from the external database WordPress audit trail to a new one in the WordPress database.

Mirroring Events to Papertrail or Syslog

You can also mirror (keep a copy) of all the events 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 Events

You can archive some of the WordPress activity log events from the main database to an external MySQL database. The Search and Report will still work and can still retrieve data from the archiving database. To configure archiving, read the configure archiving of the WordPress activity log events.
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 WordPress activity log events to an archiving database?

How can I mirror the WordPress activity log (audit trail) to Syslog?

How can I mirror the WordPress activity log (audit trail) to Papertrail?