Random WordPress Notes

// February 18th, 2010 // Blogging, Word Press

wordpress

As many of my friends know, I’m very enthusiastic about the WordPress blogging platform. I’ve been using WordPress for around 7 years to run this blog. Lately, I’ve started training friends and my own clients on WordPress. It’s really the easiest and most versatile content management systems out there. I have many years experience with content management systems, but I prefer WordPress. Using it more often for business clients and personal projects.

At some point in the next few weeks, I will be blogging more about WordPress and other tech at the new Bread and Roses tech blog. But I’ll share a few items about my WordPress projects before things fire up over there. By the way, we need a catchy name for the blog.

Today we launched a new site for the Blue Nile Cafe, a popular Ethiopian restaurant here in Kansas City, Missouri. The old design was a simple one based on CSS and static HTML files. The new one is built on WordPress and uses a theme similar to the one used for this blog. I wanted to start using a content management system like WordPress for more client sites, mainly to make maintenance easier for me and so that the clients can make changes and add content. I also wanted to use a pre-built system that is friendly to most browsers–debugging browser compatibility issues is the thing I hate most about web design. Also wanted to use WordPress because it comes with lots of good plug-ins. Currently, the new site is using “My Page Order”, a versatile gallery plug-in, and a popular SEO plug-in.

Here are a few WordPress tech notes from the past few days:

  • If you are setting up a draft WordPress site in a subdirectory of a current site, there is an important step you have to do before you move files around and make the site live. I didn’t do this right with my blog and it took several hours of hair-pulling to fix things. Before you move files, go to Settings > General and change WordPress address (URL) and Blog address (URL) to the new URL. DO NOT VIEW THE SITE! Go to the site via SSH or SFTP and move the files around. Things should work after the files are moved.
  • I like the URLs for my websites to be readable, so configuring Permalinks was something I finally figured out how to do correctly. I want the URL for each page and post to include the words in the title of the page or post. You do this by going to Settings > Permalinks and typing /%postname%/ into the custom structure. Create an .htaccess file in the website root if it doesn’t exist and make it writable (777 should work). Click the blue Save Changes button and WordPress will write some code to the .htaccess file. Change the permissions back for that file to the previous settings. The new URLs for your blog / website should work.
  • If you change the URL structure of your blog or website, remember that you may have to change previous redirects in .htaccess and you’ll have to add new ones.
  • If you set up shorter URL names (or permalinks) for your blog, be aware that the new structure may conflict with existing directories. This blog used to be the only thing on this site and happily sat in a subdirectory called “blog.” I wanted to retain this address for the blog when I set up this website to be a homepage for myself with the blog off the main page. For days I couldn’t figure out why the blog wasn’t showing up. I thought I had to tweak the .htaccess file, which was redirecting visitors to the old subdirectory. This afternoon I finally figured out the problem. WordPress creates permalinks using the custom structure I mentioned earlier in a way that the URL looks like a subdirectory. The blog URL wasn’t working because there was still the “blog” subdirectory. Once I removed that subdirectory, the new URL works.

- Chuck

Leave a Reply