Solidifying WP Security

Designed with PHP, and powered by mySQL directories, WordPress is used by an amazing 8.5% of all websites. Web delivered spyware and web page hacking are becoming progressively more common. With such a lot of web content using WordPress as a CMS, any security weaknesses in the CMS structure or core could impact a lot of websites. In this article, we’ll describe how you can best secure your WordPress CMS site from malware and attacks.

1 – Examine Overall Desktop Security.

For starters, ensure that that any and all PCs and web servers you use are kept properly secure. Ensure that you’re running the latest version of your browser, and make sure that it’s set to routinely patch. Do the exact same with your computer virus software and OS. Check your PCs and servers for malware, regularly. Ensure that you use proper firewalls at the OS level, at the router level and at the ISP level, whenever possible. Any security gaps outside of WordPress, in software and hardware you use with it, can affect the CMS itself. It’d be sad to create a really secure password for your WordPress admin account, only to find out a keylogger overcame all of your efforts.

2 – Latest WordPress release.

Keeping WordPress current through the administration sections.
You need to make sure you always have the latest release of WordPress. Updating WordPress is relatively straight forward, and can be done through the WordPress admin in your browser. If the most current edition of WordPress is incompatible with the versions of PHP and mySQL installed in your hosting server, I suggest you go and attempt to update those to guarantee WordPress is the latest. — ask your hosting tech support guys!

3 – Make Note of Bugs and Vulnerabilities and report!

If you ever come across security flaws on your own, do everyone a fav and report it to security@wordpress.org. If the weakness is with a plug-in instead, e-mail plugins@wordpress.org. You would want other web programmers to record loopholes that may impact your web page, so you can do the same! Just keep away from composing about those fresh found security flaws on the web or on public networks, so that the details don’t get passed onto the wrong person.

4 – Look at For Exploits

From time to time, run the Exploit Scanner plug-in to check for symptoms of malicious activity.  Exploit Scanner doesn’t immediately repair any problems, but it will give you a detailed log to diagnose. If you suspect a hack or a break in attempt, then it’s time to run that plug-in, as well.

5 – Eliminate Customised Code When Possible

WordPress can use custom made HTML for numerous functions. If that isn’t completely essential for your website, you may want to disable unfiltered HTML by adding the following line to your wp-config.php file:

define( ‘DISALLOW_UNFILTERED_HTML’, true );

6 – Don’t Look Brand spanking new

Remove all default content and comments. If dangerous cyber-attakers discover those on your website, it may indicate to them you have a brand new WordPress website. New sites may seem simpler to hacker to break into. It’s simpler to break into a WordPress website when you know which edition it is, so be sure to disguise it. This is done in two locations on the WP backend. The first is the meta generator tag in your design template. That is found in “wp-content/{name of your WordPress theme}/header.php”. Look for something like “” and remove it. The other place is in your RSS feed. Look “wp-includes/general-template.php” and look around line 1858. Find:

function the_generator( $type ) {
echo apply_filters(‘the_generator’, get_the_generator($type), $type) . "\n";
}

Ensure that a hash is applied next to the “echo” command so that it looks like this:

function the_generator( $type ) {
# echo apply_filters(‘the_generator’, get_the_generator($type), $type) . "\n";
}

Also, eliminate all instances of “Powered by WordPress” footers, as hacker use the phrase to find sites to crack into via search engines. That footer also signifies a new WordPress site, or sites created by newbies, whether or not that actually is applicableto you.

Make it a point to delete /wp-admin/install.php and /wp-admin/upgrade.php after every WordPress installation or upgrade. All those scripts are only ever used in the course of the installation and upgrade procedures, and aren’t used in the day-to-day development of your website. You can however upgrade without those data files, as all upgrades include those scripts.

Modify a couple of the file and directory name defaults. Go to Settings > miscellaneous in your administration console and change the names of “wp-content/ directory “ and “wp-comments-post.php”. Ensure to change the template URL inside the template and “wp-comments-post.php” appropriately, to retain the function of your web site.

7 – Obscure Indexes

A .htaccess file = your friend

Make it a point of disabling open access to indexes whenever possible. If people can find the files in your site’s “wp-content/plugins/” directory without being authenticated, it’s a whole lot simpler to hack into your website through plug-in vulnerbilities. If your web server operates Apache or another OS that uses .htacess files, it’s straightforward to do. Find the .htaccess config file in your site’s root directory.

That’s the directory that contains “index.php”. Embed the text “Options -Indexes” anywhere in the file. On the other hand, if you can’t alter a .htaccess file, upload an “index.html” file within the main directory. You could develop that webpage to have a very similar appearance to your site’s PHP web pages and insert a hyperlink to your “index.php” file if you’d like. But naturally, for WordPress CMS site, visitors won’t see your “index.html” file unless they type a specific path to it in their browser. Alternatively, you could make your “index.html” file a 0 byte placeholder.

Just in case your web server ever has issues processing PHP files, it’s crucial to prohibit web directories that are only reached by your server. If the PHP source code is ever viewable in a visitor’s web browser rather than the webpage it’s expected to render, they may find database credentials or in depth information about the PHP/mySQL programming of your site.
Your site’s “wp-includes/ “ directory is the most essential one to prevent. Find the .htaccess file there and insert:

RewriteRule ^(wp-includes)\/.*$ ./ [NC,R=301,L]

If there are any subdirectories of “wp-includes/”, put in the following code for each one in the same .htaccess config files:

RewriteRule ^(wp-includes|subdirectory-name-here)\/.*$ ./ [NC,R=301,L]

 

8 – Back Up, Back Up, Back Up!

WP-DB Manager is fantastic for backing up your overall WordPress site, but this will also notify you to mySQL vulnerabilities and inform you about parts of your DB that are publicly accessible.

Make sure to properly back up the content of your website. In a worst-case situation, maintaining back ups will enable you to effortlessly restore your website. With WP-DB Manager, you could also use Online Backup for WordPress. If you are using the phpMyAdmin facility to do this if it is included in your hosting package, then fair enough, but for those not too comfortable with using a SQL manager, then this a a good alternative. The backup file the plug-in creates can be stored in your e-mail inbox, on your PC, or you can use the 100MB of free storage space on developer Backup Technology’s own secure servers.

9 – Security Plug-Ins

As earlier mentioned the Exploit Scanner plug-in, which you should run on your site every so often to check for vulnerabilities and hacking efforts. There are many other WordPress plug-ins that I suggest you deploy and use. When used effectively, they can secure your WordPress site very efficiently.

With Exploit Scanner, you can also use WP Security Scan. Not only will the plugin look for vulnerabilities, but it’ll also give you specific advice for preventing them.

To avoid “man-in-the-middle” hacks to find your login specifics, be sure to encrypt your login packets with Login Encryption. That plugin uses both DEA and RSA algorithms for enchanced protection.

Installing plug-ins from the administration panel

Configure the Limit Login Attempts plugin to prevent brute-force attacks. With the plugin, you can set a maximum number of login attempts, and also set the length of time of lockouts inbetween.

The User Locker plugin works in a very similar way. Here you can set a maximum number of incorrect verification attempts before the account is locked.

There’s also an excellent plug-in for securing your entire admin panel. Try Admin SSL Secure Plugin to encrypt your panel with SSL.

As mentioned before, it’s an great idea to modify as many WordPress defaults as possible. With Stealth Login, you can create custom URLs for logging in and out of your site.

WordPress sites are regularly focused by spambots. I have to spend a lot of time going through comments on my site, and the majority of my pending comments have to be marked as spam. Imagine what those spambots can do to your site, beyond giving you a lot of boring extra work! Consequently, I recommend using Bad Behavior on your site. By logging your site’s HTTP requests, you can better diagnose spambot issues. In addition, the plugin will control access to your website when a bot visits.

With Bad Behavior, you can also use User Spam Remover. It will remove unused accounts on your site. You can set an age threshold to those settings and you can also configure a whitelist.

Block Bad Queries will try to block malicious queries made to your site. It looks for “eval(” or “base64″ in request URIs, and also looks for request strings that are suspiciously lengthy.

An anti-malware safeguard can be applied to your entire site with the Anti-virus plugin. It looks for viruses, worms, rootkits, and other forms of malware. Be sure to keep it updated!

When you choose and install plug-ins on your site, also be sure to only install plugins offered through your admin panel or under the plug-in index at wordpress.org. External plug-ins may be secure, but it’s best to reduce the risk. Officially published plug-ins are audited for security and scanned for malware.

One other thing you can use to secure sections of your website is to add a .htaccess file to “wp-admin” folder with Deny from all and Allow from your IP (If you have a static IP address). That way you will be the only one that has access to the admin dashboard. If you need to login from additional machines just add that IP’s to the .htaccess file (using SSH to edit the file).

Keeping your WordPress site tight for security is an continuous duty, just like all other areas of IT and development security. You can’t just configure a number of options or parameters and then be done with it. Your WordPress website should be on a timetable for spyware and vulnerabilities.

By maintaining your WordPress site secure, you are performing your piece to reduce malicious activity. As WordPress is such a common CMS on the web, knowledge about the design and settings of the console is readily available, and certain hacks could work on probably countless numbers of websites. Thankfully, understanding of WordPress security is plentiful, for much the same factors. In the ongoing upkeep of your websiter, always be security oriented. You can then have appropriate control over your content.