Skip to content
Prem Tiwari
  • WP Tutorials
  • Plugins
  • About Me
  • Featured On
  • Let’s Talk
Prem Tiwari
Home / WordPress Tutorials / WordPress Security Implementation Guideline

WordPress Security Implementation Guideline

ByPrem Tiwari Last updated onOctober 3, 2024

Securing your WordPress site isn’t just an afterthought, it’s a critical part of your digital presence. With WordPress powering more than 43% of websites globally, it’s no wonder that it’s a favorite target for hackers. But the good news? With a solid security plan, you can easily protect your site from common threats.

In this post, I am going to share some practical and easy-to-follow steps about WordPress security implementation guideline that will help you maintain your WordPress security without overwhelming you with unnecessary jargon or complicated technical terms.

WordPress Security Implementation Guidelines

Below is the some WordPress security guidelines which must be implemented in every WordPress website which you are developing to secure yourself from hacking:

  1. Define Login Attempt Limit
  2. Rename your admin URL with custom URL
  3. Rename database table prefix from “wp_” to something else
  4. Always add security salt in wp-config.php file
  5. Remove WordPress version from your website
  6. Add blank index.php files where needed
  7. Delete readme.html and install.php file

1. Define Login Attempt Limit

Always define the login attempt limits in your websites, this helps you to protect you from attackers/hackers by blocking them IP addresses. There are many buildup plugins are available in the WordPress plugin directories.

Recommend to use the WP Limit Login Attempts plugin. (https://wordpress.org/plugins/wp-limit-login-attempts)

2. Rename your admin URL with custom URL

There are many plugins are available in WordPress plugin repository to rename WordPress default admin login url. You can use the WPS Hide Login (https://wordpress.org/plugins/wps-hide-login/)

3. Rename database table prefix from “wp_” to something else

Always rename your WordPress database prefix from default prefix “wp_” to something else because everyone know the default WordPress database table prefix.

It is easy for hackers to inject the SQL injection using the database table prefix.

4. Always add security salt in wp-config.php file

Add the security salt in wp-config.php file to more secure your website. Click on this link https://api.wordpress.org/secret-key/1.1/salt/ to generate the security salt and copy paste the security salt in your wp-config.php file. The security salt is look like this:

define('AUTH_KEY',         'iSz5`TF{DaN0{b-DNMb+W{8n_/.>-d|xz/l[=89H|WUHpT>Jh[Od+9TNp,.8n](6');
define('SECURE_AUTH_KEY',  'rX`t!M1oJ#sj/UWQX|,r#b3.{-? 4.JX2F@o#!{~j.j-An&|l~=U;2kg<n^4-Zq0');
define('LOGGED_IN_KEY',    '}}boFMV??gGTU,T||L7JTzi-w/7z9Mv--|;<L*SRnl(qbp-g*D6C[~H8$Qu]X&QI');
define('NONCE_KEY',        'xw:+B F>#x.<1hd=tXe7&rD0p.}^}?<YS|C+-`-j: }IW3PD2bpLsQB]v*>Masnj');
define('AUTH_SALT',        '79~gbJKZFSe} fDr^[>bx;SnG<Aq# kV?wFy4[T<Wp!E=UU2Vt!zku[-<Q%_I4TO');
define('SECURE_AUTH_SALT', 'pa:XW_7rCEbYdv.7Jp&4L5VMLHrrl%#Ew!{B7Q+0_S>/0M-z^^4:K.FRkLx=JtEt');
define('LOGGED_IN_SALT',   '&pdn J&/iyA_gUv>c-o)P!%`o[%7gKHd!Q+Ljc<ePVP{c5j|LwP);mmpZ(@7&[Q$');
define('NONCE_SALT',       '3Df(K@fW|mD+w0PkJQ02iS wiD,8}Yqu6HQA|s}p8IL.>*&$`9 m<X;4W%-(tz+~');

5. Remove WordPress version from your website

Please make sure, you have removed the WordPress version which you are using from your site, because of it may be hackers/attackers will hack your website via known weaknesses of that release which you are currently using. 

Use the below code at the end of your functions.php file:

//Remove the version number of WP
remove_action('wp_head', 'wp_generator');

6. Add blank index.php files where needed

To add an extra layer of security, blank index.php files should be added to the folders that don’t have indexes in order to prevent browsing of the resources. The main folders that need to be considered are:

  • wp-includes
  • wp-content
  • wp-content/plugins
  • wp-content/themes
  • wp-content/uploads

7. Delete readme.html and install.php file

As a final step to secure your WordPress site, make sure you have deleted the readme.html file from the root directory of your website and also remove the install.php file located in the wp-admin folder. This will help enhance your site’s security significantly!

Conclusion

After implementing all the above steps, please make sure to install a reliable security plugin on your site. There are many effective security plugins available in the WordPress repository, but I highly recommend you choose any one from the below list:

  • Wordfence Security
  • iThemes Security
  • BulletProof Security
  • Sucuri Security – Auditing, Malware Scanner and Security Hardening

Let’s make this year the one where you truly take your WordPress security seriously and address all potential security issues on your WordPress site once and for all!

Found it helpful? Share it with your friends on social media!

  • Facebook
  • Post on X
  • LinkedIn
Post Tags: #WordPress#WordPress Security#WPSecurity
Prem Tiwari

Prem Tiwari is a passionate advocate of open source technology, with over 10+ years of experience in the WordPress domain. He has great experience when it comes to scaled WordPress projects which caters the need for big enterprise clients on WordPress and WordPress VIP-GO platform.

Facebook Twitter Instagram YouTube Linkedin

Post navigation

Previous Previous
Responsive Facebook Like Box
NextContinue
How to Secure Your WordPress Site in 4 Simple Steps

Collections

  • Crawling and indexing
  • Meetup
  • PHP
  • Plugins
  • SEO
  • Tech Talks
  • WooCommerce Tutorials
  • WordCamp
  • WordPress Tutorials
  • Privacy
  • Cookies
  • Disable Update Notifications
Facebook Twitter Instagram YouTube Linkedin WordPress
Scroll to top
  • WP Tutorials
  • Plugins
  • About Me
  • Featured On
  • Let’s Talk