Protect Your Web Server With Ipset

The Linux packet filter provides an easy way to protect against unwanted network intrusions. Often referred to simply as “iptables“, it is a basic firewall built into the Linux kernel. Iptables is most useful, perhaps, on those servers most susceptible to attack, such as LAMP systems, content management servers and blogging platforms like WordPress, especially where they are Internet facing.

Ipset is a fairly recent addition to Linux, having been introduced into kernel version 2.6.32. This means it is supported in Debian 7 and 8, as well as Red Hat 6 onwards. In short, ipset allows a large number of IP addresses to be blocked in an efficient way, as demonstrated below. Continue reading

Install WordPress Blog on Raspberry Pi

The Pi’s low power consumption makes it well suited to the role of always-on web server. This post describes how to install WordPress on the Raspberry Pi and get a blog going. Hosting your own blog means you keep ownership of your data, and you are not dependent on blogger.com or whoever.  This procedure was UPDATED on 11th march 2020 for Raspbian 10 / Buster.

If you have already installed WordPress and just want to upgrade it, perhaps because a new version has been released, please see my article How to Upgrade WordPress on Linux

Install Apache

Install the Apache web server with these commands. It might take 10 minutes or so to complete. A few other packages will also be installed. Continue reading

WordPress WP-Super-Cache vs Quick Cache

Joomla, Drupal and WordPress are the world’s most popular blogging platforms. Right now I’m staring at the WordPress “Add New Post” page, because this blog is built on WordPress. WordPress is great. And incredibly slow.

Here’s One I made Earlier

This post appeared quickly in your browser ? Great. You have been served a page that was built several hours ago. Without the pre-fabricataion, you would have had a 5 or 10 second wait while WordPress created the page from scratch. Who waits 10 seconds for a page to load these days ? Nobody, that’s who. This post compares two WordPress caching plugins and finds that WP-Super-Cache is the best because of its ability to cache compressed pages. Continue reading

Repairing the MySQL WordPress Database

You can recover a running MySQL database with the mysqlcheck command.

After a power cut, I found these errors in /var/log/daemon.log. This was on Debian Squeeze running WordPress 3.3.1 and MySQL 5.1.61.

Mar 22 11:22:16 debian /etc/mysql/debian-start[2153]: Triggering myisam-recover for all MyISAM tables
Mar 22 11:22:17 debian mysqld: 120322 11:22:17 [ERROR] /usr/sbin/mysqld: Table './wordpress/wp_commentmeta' is marked as crashed and should be repaired
Continue reading