Webspace of Eric Brodeur

Perspectives on storytelling and digital cinema.

Tag Archive: WordPress

WordPress logoSome time ago I tried the DISQUS plug-in for WordPress and discovered it broke my RSS feed due to a JavaScript bug. DISQUS support didn’t have a solution at the time so I deactivated the plug-in.

A recent search unveiled a workaround by disabling the Comment Count setting in the Advanced Settings of the plug-in.

It works, although a genuine fix would be ideal. With version 3.0 on the horizon I doubt they are looking backward.

WordPress plugin upgrade explained

WordPress logoWordPress 2.7 offers the ability to automatically upgrade plugins as they are released. No more downloading and FTP’ing.

My first experience upgrading a plugin was one of those head scratching moments. I clicked the “upgrade automatically” link and was presented a form asking for connection information.

What sort of connection information? To the plugin developer’s web site or WordPress.org? What user account? There is no documentation at WordPress.org for this feature and the forum posts were of little help.

The obvious solution was the last I tried; you must enter the information for your hosting platform where WordPress lives.

Hostname
myblog.com
Username
myblogadmin (try your hosting admin user account which should be the same as your FTP account for up/downloading of files to your web site)
Password
Password for the preceding user account
Connection Type
Normal (unsecured) FTP or Secure FTP
Behind the scenes WordPress will create a temporary folder inside of wp-content called upgrade.

If you are having trouble with downloading, unpacking, or installing the plugin you’ll need to look at file ownership and/or permissions on your web host. Chris Abernethy provides some helpful insight.

Moving a WordPress blog to another folder

Changing the location of a WordPress installation isn’t as harrowing as it may sound. Although no tools exist to do it automatically, some knowledge of the Linux command line and MySQL makes it do-able. This post is a summary of the steps I performed to relocate my blog folder; this assumes you are hosting under Linux, MySQL, and cPanel. Take a gander at the official Moving WordPress documentation before you begin.

Make a Backup

Be sure to make a backup of your installation.

Change the Current Blog Folder

Rename your existing WordPress folder (i.e.: /journal) to the new name. FTP or ssh (i.e.: mv journal blog) can be used for this.

Update the blog path settings within the admin panel.

Updating Paths in the Database

If your blog posts contain images or links using the old folder they must be changed. There is a simple SQL command which performs a search and replace. I suggest using phpMyAdmin instead of MySQL’s command line.

Take a look at your wp_options table in phpMyAdmin. You may find that plug-ins are using your old path in their settings which may be not accessible through the admin interface.

Don’t Break Trackbacks

If anyone is linking to your blog they’ll be using the old folder name. To ensure those links don’t break with your folder we can use a symbolic link and a 301 redirect.

Login to your Linux hosting account using ssh and navigate to the root folder of your web site such as public_html. Enter the following command:

ln -s /path/to/new /path/to/old

Replace /path/to/new and /path/to/old with the absolute folder names. For example:

ln -s /home/your-domain/www/blog /home/your-domain/www/journal

You may be tempted to add a redirect using cPanel but don’t – the symlink above is doing this for you.

Unfortunately, permalinks still won’t work. For example, a permalink of http://your-blog/journal/2008/06/my-post will generate a 404 Not Found instead of redirecting to http://your-blog/blog/2008/06/my-post. Don’t bother with the Redirection plug-in because it doesn’t build a library of prior permalinks.

Instead, use Alexandra’s technique to modify your .htaccess file and all of your old permalinks will 301 properly.

Powered by WordPress. Theme: Motion by 85ideas.