WordPress: Internal Server Error (500) after moving to new location

You follow the official WordPress migration documentation and still end up with the dreaded internal server error. This little incident launches you into panic mode. You spend the next 30-60 mins googling a fix for this godforsaken situation. Most of the solutions you come across mention something about fixing/deleting your .htaccess file. Alas, that doesn’t work for you. Not even disabling all plugins. What do you do?

Chances are your WordPress installation’s file permissions are screwed, as happened with me during my recent spring cleaning. After wasting some time googling for solutions, I ended up realizing that file permissions for all my WP files were reset to 640 (-rw-r—–). And I had only moved my installation to another directory on the same server. None of the solutions that I came across on Google talked about file permissions as a potential problem. So I thought I’d share this little fix.

The fix is simple. If you have access to your web server via ssh, you can execute the two commands mentioned on Hardening WordPress page.

find /path/to/your/wordpress/install/ -type d -exec chmod 755 {} \;

find /path/to/your/wordpress/install/ -type f -exec chmod 644 {} \;

Otherwise, manually change the permissions via an FTP client.

Fixing the partition table: Mis-sized extended partition

This article requires the reader to have at least some basic understanding of harddisk partitions and MBR.

If you are one of the rare unfortunate blokes who have got their partition table screwed up due to a mis-sized extended partition, fret not, for there’s a very simple-to-use tool that can fix things for you. I discovered FixParts when I realized I was one of those unfortunate blokes with a messed up partition table when I was trying to install Mint 13 on my laptop. Of course, things do not go wrong without a reason. A few months back, to install Ubuntu 11.10 “Oneiric”, I did some shrinking and expanding of partitions using GParted, which must have screwed up my extended partition, making its end sector greater than the total sectors on my harddisk!

Although not a harmful scenario (damn, I didn’t even discover it until after 7 whole months!), it makes the partition table look fine and as expected in some partition managers but botched in others. As was in my case, Mint 13’s installer wasn’t able to see any partition on my disk and showed the disk as being completely blank.

A simple run of fixparts and saving the partition table to MBR fixed things for me. Silent and fast! So in case you’ve got your harddisk’s partition table not-so-heavily goofed up, FixParts is highly recommended. In case it is a more unfortunate case, TestDisk might save your day.

Enabling 3D effects in KDE 4

KDE 4 comes with it’s own set of cool 3D effects built-in, but disabled by default. In order to enjoy these effects, you need to enable them manually through the Desktop section of System Settings. But in some cases, enabling 3D can get painfully difficult, as was in my case.

3D can be enabled through one of two options – XRender and OpenGL. Effects using XRender are quite slow and inferior to what is offered by OpenGL.

Enabling 3D with XRender normally works well on almost all machines, but problems start when you try to enable 3D using OpenGL. The most common error that pops us when trying to do so is:

Failed to activate desktop effects using the given configuration options. Settings will be reverted to their previous values

Here are some simple steps to make sure you can enable OpenGL 3D effects without errors and problems.

To start with, make sure you have:

  • Proper video drivers installed (proprietary drivers in case of NVIDIA and ATI) and 3D acceleration enabled.
  • The xorg.conf file setup properly.

In most situations, these sections are usually missing from the file xorg.conf (found in /etc/X11):

Section "Files"
    ModulePath     "/usr/lib/xorg/modules/extensions/nvidia"
    ModulePath     "/usr/lib/xorg/modules/extensions"
    ModulePath     "/usr/lib/xorg/modules"
Section "Screen"
    Option       "AddARGBGLXVisuals" "True"

Continue reading Enabling 3D effects in KDE 4