Secure your wordpress website from hackers

| Last Updated: | In: Wordpress, WP Labs


You may have been working on a website, or reading an article about web development, and heard about the .htaccess file, but wondered what it was, or what, if anything, you can do with it.

This tutorial will tell you the basics about .htaccess, and show you a few ways to secure your wordpress website from hackers

wp-htaccess

1. Blacklist undesired users and bots ip address

2.- Redirect visitors to a maintenance page

3.- Redirect www to non www or vice versa

4.- Force Caching with htaccess

The following htaccess code won’t help the initial page load, but it will significantly help subsequent page loads by sending 304 statuses when requested elements haven’t been modified.

5.- Allow only your IP address on the wp-admin directory

Allow only your IP address to access administrator area of your website. This will help you from hackers to hack your website. Copy paste code in your .htaccess file and upload it to root directory of website.

6.- The easiest way to ban a WordPress spammer

7.- Deny access to your wp-config.php file

8.- Enable gzip to speed-up your wordpress website

Is your website taking more time to load, if yes, copy paste below code in your .htaccess file. Below code will enable gzip compression for your website, which will reduce web page loading time.

9- Redirect Old domain to New domain

If you want to redirect your old domain to new domain, then create .htaccess file on root of your website and copy paste below code.

10- GZip compression

Please don’t forget to share and subscribe to latest updates of the blog. Comments and feedbacks are always welcome! Thanks!

Tags: , , , ,


About: Prem Tiwari

Prem Tiwari is founder of freewebmentor.com and Software developer from New Delhi (India). Follow Prem's development codes on facebook, and make sure you check out freewebmentor.com for the latest in web development related Tips with the complete code.


You may also like:

Follow us!

Get Free Access of 350+ Scripts

Don't worry you'll not be spammed!

Featured eBook

WordPress Security Guide

Learn how to implement security guideline in your WordPress site...

DOWNLOAD

Pincode Finder

pincode-finder tool

Online Pincode Finder

Best tool to locate post Office address and pincodes of all india...

SEARCH NOW