WordPress site hacked? Are you worried with wordpress site security ?
WordPress site security checklist and hardening process.
- Remove the Readme.html and Licence.txt from the root directory and install.php file to prevent it from information leakage.
Add this code in function.php to remove wordpress version.
return ' ';
add_filter( ' the_generator' , 'wp_remove_version')
you can also use this simple code to do that.
Check in function.php for auto create user after the theme activation. If there any function exists and remove if you found any function like add_user().
Check all file folder permission if there is any 777 and make those appropriate the suitable one also do not forget to change the permission to 444 for the wp-config.php and .htaccess.
Check in .htaccess for redirection if you found any verification or redirection or rewrite make sure those are for your site and if any unnecessary anything found remove those.
Hide the default backend for login wp-admin to desired one like security-wordpress.
Scan for core wordpress files and check if it is modified or not, you make take help of many plugins for this like wordfrence and sucuri.
Check every wordpress files for encoded texts there or not if you found any base64 encoded text then remove those.
Check for hidden input in the form and pages of your theme files.
Check for strong password and enforece user to use strong password.
Check for admin users in the database and take care if there is more than one admin user.
Keep backup of files by hash like backup buddy or all in one wp migration.
Connect the site with git like bitbucket or github for code repository.
Scan automatically for malware in the files using any malware scanner or antivirus.
Enable WAF like bliacklist ip, exploitation check, check for blacklisted IP address, bad bot access denied, backdoor location denied, DDoS attempt recognize, fake bot access, evasion access denied, spam request block, scanning tool block and many more.
Change database default prefix wp_ to any desired one.
Change default wp-content directory to any desired one.
Change default uploads directory to any desired one folder.
Change admin user with database index 1 to another but not less than 100 index.
Disable file editing option in wordpress default editor.
Enable auto update of plugin and core wordpress.
Disable php execution on uploads directory.
Limit login attempts and enable lock down options for IP’s.
Enable white list ip for your one if needed.
Password protect the admin page and third party authentication for login like two factor authentication.
Enable google captcha in dashboard login for robot verification.
Disable directory listing and browsing in .htaccess.
Disable XML-RPC in WordPress for API request.
Automatically log out Idle Users in WordPress after a certain period.
Add Security Questions to WordPress Login Screen to verify user.
If hacked please replace all core wordpress files and then just keep only the uploads and theme folder also remove all plugins from the plugins directory and install the previous installed plugin also check the uploads directory for malware code.
keep records of files and plugins and themes installed and also the active theme when and by whom.
Edit style.css to remove the theme info and version disclosure.
Spam comment block.
Add captcha in contaact form 7 and also in comments option and also in any form submission to prevent sending email and auto spamming.
Find all css hidden properties and check for which reason this is added.
Remove meta tag and wordpress version to detect the server and wordpress information.
Option for wordpress heart bit enable disable.
Disable wordpress username enumeration.
Disables wordpress plugin enumeration.
Change default hash salt in wp-config.php.
Enforced transport layer encryption for administrative tasks.
Email option for all alert to admin.
Install a malware scanner to checks core files, themes and plugins for malware, bad URLs, backdoors, SEO spam, malicious redirects and code injections.
Real-time malware signature updates via the Threat Defense Feed.
Compares your core files, themes and plugins with what is in the WordPress.org repository, checking their integrity and reporting any changes to you by plugin.
Repair files that have changed by overwriting them with a pristine, original version. Delete any files that don’t belong easily within the wordpress interface.
Check your content safety by scanning file contents, posts and comments for dangerous URLs and suspicious content.
Check to see if your site or IP have been blacklisted for malicious activity, generating spam or other security issue.
With Live Traffic, monitor visits and hack attempts not shown in other analytics packages in real time; including origin, their IP address, the time of day and time spent on your site use google analytics.
Audit error log and notify user or admin.
Audit Trail & User Activity Logging
Import/Export of options across sites and backup the settings.