Aug 132014
 

All In One Database Security helps you setup the database security, change db prefix, create database backups and more.

Last Updated: March 6, 2024

Latest News: Updated the documentation.

It is very important to create a database backup of your site. AIOWPS has the feature needed for this. Once you install AIOWPS plugin, the first step you need to take is to create a database backup. If anything goes wrong from here on, you will be protected and you will be able to restore your site through the database you create in this step.

Note: Make sure you follow these steps carefully.

 What you need:

All In One Database Security

Step 1 ) Go to WP Security -> Database Security admin sidebar menu as illustrated in the image below to start configuring your database backups and administration.

aios-database-security-admin-sidebar-menu-new

Database prefix

Important: Create a database backup before you begin changing your database prefix. This is an extremely important step you must take just in case something goes wrong.

Step 2 ) Go to WP Security -> Database Security -> Database prefix tab to set up the following options.

Note: The following warning, lets you know that the database prefix should be changed. This is very important.

Your site is currently using the default WordPress DB prefix value of “wp_”. To increase your site’s security you should consider changing the DB prefix value to another value.

DB Prefix Options Settings

  • Current database table prefix:
  • Generate new database table prefix:
  • Or choose your own DB prefix by specifying a string which contains letters and/or numbers and/or underscores. Example: xyz_.
  • Click on Change database prefix button once you have completed configuring this settings.

Enabling this feature will give you another 10 points score towards your security meter. (Intermediate Security Level)

aios-database-prefix

Database backup

Step 3 ) The following image Database backup allows you to create manual and schedule backups. Before you begin you need to install the following plugin UpdraftPlus. This plugin will manage all your backups.

all-in-one-wp-security-and-firewall-database-security-backup

Step 3-a ) The following image illustrates the following options after UpdraftPlus plugin is installed and activated.

Database backup options

  • Manual Backup
    • Click on Create a database backup now button to start creating your database.
  • Automated scheduled backups
    • The database scheduling will be carried out in UpdraftPlus plugin admin section.

all-in-one-wp-security-and-firewall-manual-database-backup

Troubleshooting Backups

Q1 I have created scheduled backups, but they don’t run consecutively on a daily basis as per my setup.  I don’t understand how backup works using WordPress wp-cron functionality.

Explanation: How the scheduled backup feature works with WordPress wp-cron functionality.

The backup time is set at the time you save the automatic scheduled backup settings. In order for the backup to trigger around the time you expect it to, you will need some kind of site activity (such as someone visiting) just after that time.

For example: I’ve configured my scheduled backup settings to do a once daily backup. I saved the config now and it is currently 7:11pm at my location. Then the wp-cron job will be scheduled to perform a backup at around 7:11pm everyday. What this means is that the next backup will be scheduled for tomorrow at approximately 7:11pm. However, if nobody visits my site till 10:30pm tomorrow, then no backup will occur at 7:11pm because there was no activity on the site just after 7:11pm to trigger the wp-cron event. What will happen is that the system will immediately trigger a backup as soon as someone visits my site anytime after the scheduled time. (In other words in this example the backup will occur at 10:30pm)

On the next day the same thing applies. The aiowps backup is still scheduled for around 7:11pm and if I get my next visitor at 7:12pm then the backup will be performed at 7:12pm.

The following example should help you understand the example mentioned above. (Explanation provided by wpsolutions)

Backup Test Steps:

1) Enable debug, go to WP Security -> Settings -> Enable Debug (The log files can help you troubleshoot backup issues.)

2) Set “Number of Backup Files To Keep” to 5.
Do 5 separate manual backups. Check the backups directory and verify that there are 5 backups.

3) Set “Number of Backup Files To Keep” to 3.
Do 2 more separate manual backups. Check the backups directory and verify that there are 3 backups only. (2 oldest backups from previously should have been deleted)

4) Set backup time interval to 1 hour.
Over a period of a day check the backup directory and verify that the number of backups is always as per the config.
(Also check the “wp-security-log-cron-job.txt” file to verify that the logs show that backups were done)

=============================

Q2 If you receive the following error message when you try to create a backup. Try one of the solutions below.

“PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72879700 bytes) in /var/www/html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-backup.php on line 67”

It could be related to the backup directory not being created correctly in your server when you try to create a backup. It could also mean that you need to allocate more memory to your WordPress.

Solution 1: Make sure that the following path exist in your server /yourwebsite/wp-content/aiowps_backups/. With the proper folder permissions 0755.

Solution 2: Adding the following define( 'WP_MAX_MEMORY_LIMIT', '384M' ); to wp-config.php file can also help.

Hint: Remember to make sure you have 384M allocated to your WordPress if not adjust this in accordance to what has being allocated to your WordPress. Which could be 96M, 128M, 256M.

=============================

Q3 I am unable to create database backups. How do I fix this?

Solution: Check to make sure the following folder “aiowps_backups” in the wp-content folder exist with the correct file permissions. Click the following link forum post to learn more.

=============================

FAQ

Q1 How do I restore my database from the backup file?

Solution: Click the following link how-to-take-a-database-backup-using-the-all-in-one-wp-security-plugin to learn more.

=============================

That is how simple it is to manage your database backups.

If you have any questions please let me know

Enjoy.

All In One Security (AIOS) Plugin Tutorial List

I have been working in IT since 1999 and I enjoy the challenges it brings me. I love developing websites with WordPress. I spend a lot of time helping out in wordpress.org forums. I have been writing tutorials since 2011. Now I am learning how to manage my own VPS "Virtual Private Server.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

twenty − 18 =