Hack Proofing and Optimizing a WordPress powered website

Part 1: Prevent Spams and Hacking attacks

 

  1. Never use the username admin
  2. Use a strong password
  3. Use login-lockdown plugin to limit the number of failed logins to an administrator account.
  4. Download the plugin WP Security Scan
    1. After installation, view the WordPress firewall dashboard to see the list of scanned vulnerabilities. Each vulnerability shows the suggested mitigation policy underneath.
  1. Disable execution of any PHP script that might be injected into the server during a file upload or a theme installation / update.
    1. To do this create an .htaccess file in wp-content and wp-includes folder. Put the following lines there

<Files *.php>
deny from all
</Files>

  1. Protect wp-config.php from malicious use by adding this line to the .htaccess file in the root directory of wordpress.

<files wp-config.php>
order allow,deny
deny from all
</files>

 

  1. Download the plugin WordPress Firewall. Among other features, this plugin has options to mitigate SQL injection and stop directory browsing.

 

Part 2: Optimize WordPress … speed things up

  1. Download the plugins Super Cache and delete Super Cache – Clear all cache. The second plugin just provides a button on the dashboard for one click delete of all cache files.
  2. Use a third party image compressor (there are image compressors available online via cloud services) to compress your site images.
  3. Download Lazy Load plugin to lazy load images.
  4. Download Revisions Control plugin and configure the total number of revisions stored for a post or page. The number should be around 2/3.
  5. Download WP-Optimize and run the plugin to optimize and clean database tables.

 

References:

Leave a comment