Fighting Spammers and Hackers From Your WordPress Website

I have been getting multiple spam attempts on my wordpress blog in the comments section of my blog. These comments have not made it publicly to my blog because I have personally approve each users first comment before they can post a comment. All spam so far seems to come from automated attacks, and the attacks are daily by the same IP address. I have finally decided to do something about this.

I followed this post, http://www.wpoptimus.com/912/ban-ip-addresses-login-wordpress-dashboard/, and installed the plugins WP-Ban, and Login Security Solution.

wp-ban

Anti-spam

Anti-spam has worked great and requires the least effort. wp-ban works but requires you to manually block ips or domain names. I recommend starting with Anti-spam and only add wp-ban if needed. Anti-spam prevents bots (computer programs) from writing comments on your site. I have never had a real human leave a comment on my site. My site is configured that I have to manually approve the first comment by a person before it becomes visible on my site. Now that I have Anti-spam, my comments page is not filled up with spammers anymore. I like Anti-spam so much that I am giving them a donation.

Preventing Login Attacks

I have also added the login-security-solution plugin to block brute force login attacks. Its description is: “Security against brute force attacks by tracking IP, name, password; requiring very strong passwords. Idle timeout. Maintenance mode lockdown.”

Roundcube Web Browser Based Email

I have installed Roundcube email on my server. I now can access my email server with a web browser. If you run your own email server, you should look at Roundcube as another way to access your email. The majority of my email reading uses Evolution, however this allows me to access my email at work or from other people’s computers. I found Roundcube to be easy to install and use. Thanks Roundcube!  http://roundcube.net/

Rotating Backups of Mysql database with AutoMySQLBackup version 3.0

I am now using AutoMySQLBackup version 3.0 to backup my MySQL databases.
http://sourceforge.net/projects/automysqlbackup/

I highly recommend this software. It is easy to use and configure. It will create Daily, Weekly and Monthly backups of one or more of your MySQL databases from one or more of your MySQL servers.

Other Features include:
– Email notification of backups
– Backup Compression and Encryption
– Configurable backup rotation
– Incremental database backups

How to Modify the Dependency of Debian Package in Ubuntu 14.04

I had added a ppa to run a newer version of mythtv and mysql-server than the current supported software. This led to software update failures due to failed dependencies. I am running mythubuntu 14.04 and this post will show how to change the dependency requirement of a software package so that it will install. This method will use a bash script to save some time. The script uses the nano text editor to change the file. Terminal commands will look like this sentence.

  • Download the script “nano.debcontrol.sh”
  • Change to the directory you want to download the package to
    • cd ~/Downloads/mythtv-27
  • Download the mythtv package to modify
    • sudo apt-get download mythtv
  • List contents of directory to see file name of the downloaded file
    • ls -l
      • mythtv_2%3a0.27.4+fixes.20150423.8f14d3d-0ubuntu0mythbuntu3_all.deb
        -rw-r–r– 1 root root  77K Apr 25 08:09
  • Modify mythtv package
    • nano.debcontrol.sh mythtv_2%3a0.27.4+fixes.20150423.8f14d3d-0ubuntu0mythbuntu3_all.deb
      • Change the following line
        • Depends: mysql-server
        • Change to this
          • Depends: mysql-server | mysql-server-5.6
        • This allows the package to use mysql-server or mysql-server-5.6
      • Save file
        • ctrl + o in nano
  • View new modified mythtv file
    • ls -l
      • mythtv_2%3a0.27.4+fixes.20150423.8f14d3d-0ubuntu0mythbuntu3_all.modfied.deb
  • View package contents and order of files (important)
    • less mythtv_2%3a0.27.4+fixes.20150423.8f14d3d-0ubuntu0mythbuntu3_all.modfied.deb
  • Install modified mythtv file
    • sudo dpkg -i mythtv_2%3a0.27.4+fixes.20150423.8f14d3d-0ubuntu0mythbuntu3_all.modfied.deb
  • Done

How to Add Favicon to Worpress Administration Page

This article contains information on how I added a favicon to my WordPress Adminstration Page. This was for WordPress 4.1.1 hosted on my Ubuntu 14.04 server. I wanted a favicon because I currently have 18 pinned tabs in firefox and I rely on the favicon image to identify the wordpress tab. The general solution is to add a custom function to identify when you are in the administration menu. This function is added to your current theme in the file functions.php. Commands from the terminal will look like this sentence.

  • Change to the theme directory
    • cd /var/www/cc.com/wordpress/wp-content/themes/twentyfifteen-child
  • Edit functions.php
    • nano functions.php

// The followin code adds a favicon to the wp-admin site
// from http://clarknikdelpowell.com/blog/how-to-use-favicons-on-the-wordpress-admin-login-pages
// First, create a function that includes the path to your favicon
function add_favicon() {
$favicon_url = get_stylesheet_directory_uri() . ‘/admin-favicon.ico’;
echo ‘<link rel=”shortcut icon” href=”‘ . $favicon_url . ‘” />’;

References:

http://clarknikdelpowell.com/blog/how-to-use-favicons-on-the-wordpress-admin-login-pages

My article on creating a favicon and a list of references are located at https://blog.chadchenault.com/2015/01/10/create-a-multiple-resolution-favicon-ico-file-with-a-linux-bash-script/.