My life experiences. My Soapbox. My Blog.

WordPress categories not working

I recently encountered a problem where categories on this blog suddenly stopped working. Apparently it’s quite a common problem where both categories and tags stop working. In my case it was only categories. Tags continued to work perfectly.

As it turns out, the cause of the problem was a plugin called Advanced Permalinks. I had installed this when changing permalinks from date based to just /%postname%/ as the performance issues associated with this type of permalink was fixed as of WordPress 3.3.

So, if you have problems with just categories not working, try turning off Advanced Permalinks.

Taking a snapshot/backup of WordPress from the command line on a Plesk server

I quite regularly need to take quick backups of a WordPress installation while working on a Plesk server.

Here’s a script I created that will dump the DB as well as backup the WordPress directory where the site files are in. The concept is easy, execution was a little more complicated since Plesk can now store a secondary domain’s root within the filesystem path of it’s master subscriptions domain.

How it works

The script will query the psa database for the domain id of a supplied domain. Next it will get the www root of the domain using the domain id. It will then look for wp-config.php in that directory in case your WordPress install resides in it’s own directory. It will then grab the DB name from wp-config.php and use that to dump the right DB.

Assumptions made

  • /root/wpsnapshots will be used to store your snapshots.
  • There is only 1 WordPress install in your wwwroot directory.

How to use it

./wpsnapshot.sh domainname.com

That’s all there is to it. The script will figure out where WordPress is installed and which DB it’s using.

To Do

Making it handle multiple WordPress directories.

Feedback would be appreciated.

Enjoy!

Download script

Shopp plugin – Blank payment settings

If you use both the excellent WordPress plugins Membership (from WPMU Dev) and Shopp together, you will encounter problems with the PayPal Express payment module in Shopp as they both share a common class name. Symptoms include no payment options in Shopp’s payment settings and the following error message in the logs: mod_fcgid: stderr: PHP… Continue Reading