WordPress Security

language: PHP
license: Other

Code for Snippet:

//Confirmation of Login Information
function failed_login () {
    return 'the login information you have entered is incorrect.';
add_filter( 'login_errors', 'failed_login' );
//Access to Editors
define ( 'DISALLOW_FILE_EDIT', true );
//WordPress Version
function remove_wp_version () {
    return '';
add_filter ( 'the_generator', 'remove_wp_version' );
//Force SSL on the Admin Panel
define(?¢¬Ä¬òFORCE_SSL_LOGIN?¢¬Ä¬ô, true);
define(?¢¬Ä¬òFORCE_SSL_ADMIN?¢¬Ä¬ô, true);
//Protection Against Script Injections
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
//Restrict Access to the wp-config.php File
# protect wpconfig.php
<files wp-config.php>
    order allow,deny
    deny from all
//Change the Database Prefix
$table_prefix  = 'wooh00yeah_';
comments powered by Disqus


Source Site:


Tags: Wordpress

Link to this snippet:

Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 618
Date Added: 2015-10-12 10:12:31
Last Modified: 2015-10-12 04:21:28

Web Analytics