Monthly Archives: April 2013

Unable to use WordPress header crop

Tried to add a header image to the blog. ┬áThe image upload function worked fine but after the image was uploaded, WordPress asked to crop the image. Clicking on ‘Crop and Publish’ gives the error:

Image could not be processed. Please go back and try again.

Turns out you need an image manipulation tool called ‘gd’ to make WordPress header crop work. It is a module of php. Installation of gd:

# yum install php-gd

Had to restart apache and now header crop works!

Use subdomains with WordPress

My WordPress blog has been successfully installed.

Now, I want to run the blog under a sub-domain i.e. instead of

Let’s see how this can be done.

Initial googling points to apache and mod_rewrite. Let’s read more.

Oops, further googling shows that this can be done without using URL rewrites. Just use the built-in apache virtual hosts feature by adding the following to the config file (/etc/httpd/conf/httpd.conf in CentOS):

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /path/to/wordpress/directory
    ErrorLog logs/
    CustomLog logs/ common

And.. voila! Not really. After doing this and restarting the apache service, throws out a 404 error.

It turns out you need to change the WordPress working directory to the new URL via Settings>General before moving the files and implementing the virtual host. After that everything is OK.