1.REGULARLY  BACKUP WORDPRESS DATABASE

wp-database-backup

Sometimes accident can happen when we least expert it. If you can have made a careless mistake and your post is gone how can you restore your data in your database? Your database contains all your post,comments and link that you have on your blog so if the database is erased or corrupted you lose everything. Even long before WordPress was born it is always a wise move to have back up files.
Blogging is a big business and it if you have invested thousands or hours writing these blog post then you need the proper system to ensure that your hard work will not be lost.

wp-database-backup_download_buttonWP-Database-Backup : When plugin is installed and active. you can backup your blog database easily in single click.

2.CHANGE THE DATABASE TABLES PREFIX

As the world most popular blogging software WordPress is the huge target of malicious scripts, hacks and spams and one of the best way to secure your WordPress database is to change the Default Table Prefix and in this tutorial you will learn how to do this quickly and easily during the WordPress installation Process.

Lookout the Default Database Prefix

Go to your online web host and there you search phpMyAdmin

Here you will see WordPress table prefixes with wp_ . The WordPress table used as default values are heavily targeted by bad bots and malicious scripts. So by changes the default prefixes and set as unique can effectively immunize your Database with such automated attacks and bad boys.

Increase Database security in WordPress

How to Change default Database Prefix in WordPress

The easiest and recommended method to change the default prefix happens is before the installation process. Before submitting the setup page go to your online web host Cpanel and then WordPress site directory and open wp-config.php and scroll down where it say ‘ WordPress Database Table Prefix ‘ . Here you see the default prefix wp_ .
Increase Database security in WordPress
Changing this prefix to anything different is going to work just fine and perfectly save to include wp_ is not as long the entire prefix but even so there are three helpful tips for customizing your own database prefix
  1. Begin the prefix with wp_ so the table appears in order among other tables that are edit by plugins and themes.
  2. In the middle pick any sequence of random alphanumeric characters.
  3. At the end of prefix with an underscore _ so that the actual table names for example host, users, metadata and so forth stand out under easily recognized.
Return to your Web host Cpanel and Go to WordPress site directory and open wp-config.php and in ‘ WordPress Database Table Prefix ‘ search $table_prefix = ‘wp_’ ; and edit this as
$table_prefix = ‘wp_write random Alpha numeric characters_’ ;
Example : $table_prefix = ‘wp_s3CUr3_’ ;
wpnew db prefix
as the new prefix and save the file and after this point install WordPress in your site and complete the installation. Now again go to phpMyAdmin and you will see default DB prefix changed into new random prefixes.
Now everything looks great and all of your tables and Prefix are more secure. Note that if you already setup a WordPress and want to change prefix its still possible and you will learn in our coming tutorials. Changes the DB prefix during the WordPress installation process is much easier. The point is that by using the using the things other than default prefix can protect your database from majority of automated attacks.

3.SMARTLY PROTECT WP-CONFIG.PHP

Wp-config.php is one of the most important files in your WordPress installation. This file contains some of the very important administrator credentials that can help a hacker gain access to your WordPress database. Therefore, it is suggested that you add the piece of code below into your .htaccess file:

1
2
3
4
5
# protect wp-config.php
<files wp-config.php>
order allow,deny
deny from all
</files>

The .htaccess file will be available in your www root directory. If it is not there, then you can create the file and add the above code to it.