10 ways to make your WordPress Blog more Secure

by fzcs on 2010-07-02 19:48:07

Security is an eternal topic, especially on the Internet, and this article will introduce you to 10 tips to improve the security of your WordPress blog.

1. Delete the error message.

An error message is displayed when we fail to log in to the WordPress background. If someone wants to attack your blog then they will get a lot of useful information from the error message, we need to do is not display any information.

Workaround: Open the functions.php file and add the following code:

add_filter(' login_errors',create_function(' $a ', quot; return null; ") );

This code makes the error message returned empty.

2. Use SSL.

If you're worried about data being compromised or intercepted, use an SSL connection. However, please make sure that the blog host supports SSL. If not, skip this section.

Workaround: Open the wp-config.php file (usually located in the root directory) and add the following code:

define(' FORCE_SSL_ADMIN ', true);

We define the FORCE_SSL_ADMIN constant with a value set to true. This will enable SSL in WordPress.