WordPress Expert » permalinks http://johnlamansky.com/wordpress Wed, 01 Jun 2011 18:58:49 +0000 en hourly 1 http://wordpress.org/?v=3.3 How to Find and Fix 404 Errors http://johnlamansky.com/wordpress/404-errors/?utm_source=rss&utm_medium=rss&utm_campaign=404-errors http://johnlamansky.com/wordpress/404-errors/#comments Wed, 28 May 2008 14:00:25 +0000 John Lamansky http://wordpress.jdwebdev.com/?p=72 If you’ve changed post slugs, taxonomy slugs, or permalink structures, you likely created 404 pages (page-not-found URLs) along the way.

These 404 pages certainly aren’t helpful for visitors who stumble across them and can increase your bounce rate. It can be a particular problem if search engines, pingbacks, and/or internal and external links are sending traffic to the old URLs.

Here’s how to resolve the issue:

Stage 1: Identify 404 Problem Pages

  • If you’re registered with Google Webmaster Tools, you can view the list of 404 errors that the Googlebot has come across.

  • You can also use the 404 Notifier plugin, which can notify you via email or RSS feed whenever a 404 error is thrown.

Stage 2: Redirect

  • If the 404 errors are due to a change in permalink structure, upgrade to the latest version of WordPress. WordPress 2.3 and above will automatically redirect your old permalink structure to your new one.

  • If the 404s are because of changed slugs, or other, more complex content relocations, use the powerful Redirection plugin to point visitors and search engines to the right place with 301 redirects.

]]>
http://johnlamansky.com/wordpress/404-errors/feed/ 13
How to Put Blog Posts in Their Own Subdirectory http://johnlamansky.com/wordpress/blog-subdirectory/?utm_source=rss&utm_medium=rss&utm_campaign=blog-subdirectory http://johnlamansky.com/wordpress/blog-subdirectory/#comments Wed, 07 May 2008 14:00:17 +0000 John Lamansky http://wordpress.jdwebdev.com/?p=59 Cool WordPress-as-a-CMS tip: If your WordPress-powered site includes a blog as a component, rather than the main function, you can opt to put blog posts and archives (category/tag/date/author) into their own subdirectory (such as “blog”).

As of this writing, I have this set up on my site; just go to one of my post pages or archives and then check out the address bar to see it in action.

Here’s how to do it:

First, login to your WordPress administration. Click “Settings” (or “Options”), then click “Permalinks.”

After the beginning slash in the “Custom Structure” box, add the subdirectory name followed by another slash.

For example, if your permalink structure was this:

/%year%/%monthnum%/%day%/%postname%/

…You would change it to this:

/blog/%year%/%monthnum%/%day%/%postname%/

Click the “Save Changes” button. Now your post and archive permalinks will contain the subdirectory name that you entered. Enjoy!

]]>
http://johnlamansky.com/wordpress/blog-subdirectory/feed/ 2
7 Tips for the WordPress “Write Post” Page http://johnlamansky.com/wordpress/write-post-page-tips/?utm_source=rss&utm_medium=rss&utm_campaign=write-post-page-tips http://johnlamansky.com/wordpress/write-post-page-tips/#comments Mon, 24 Mar 2008 15:00:13 +0000 John Lamansky http://wordpress.jdwebdev.com/blog/tips/write-post-page/ Here are 7 useful tips related to WordPress’s “Write Post” page.

  1. Change a Post’s URL — If you’re using Pretty Permalinks, you can open the “Post Slug” section of the “Write Post” page and type in the text that you’d like to appear in the post’s URL. Among other things, this can be useful for shortening the URL of a post that has an abnormally long title.

  2. Post Macros — Install and configure the Shortcut Macros plugin, enter a shortcut text in the “Post” field of the Write Post page, save the post, and the shortcut will be expanded with the full text of your choosing.

  3. Disable the Visual Editor — By default the Write Post page has two tabs for post composition: “Visual” and “Code.” If you’d prefer to use the “code” editor exclusively, you can disable the visual editor.

  4. Publish Posts in the Future — The Write Post page has a feature that lets you “work ahead” on your blog. Learn about it here: How to Publish Posts in the Future.

  5. Custom Fields — Use this section to attach additional bits of information to your posts. The WordPress Codex has a good tutorial on using Custom Fields.

  6. Excerpt — Excerpts appear in lieu of the full post content on category/tag/author/date archives, assuming your theme supports it. By default, WordPress uses the first 55 words of the post as the excerpt. However, you can specify your own using the “Excerpt” section (or “Optional Excerpt” before WordPress 2.5).

  7. Remove Unused Functionality Bloat — Streamline your blogging workflow by using the Custom Write Panel plugin to create your own version of the “Write Post” page that omits functionality you don’t use (for example, perhaps the Trackbacks, Post Password, and/or Discussion sections).

]]>
http://johnlamansky.com/wordpress/write-post-page-tips/feed/ 3
WordPress Permalinks Just Won’t Enable? Try This. http://johnlamansky.com/wordpress/pretty-permalinks-wont-enable/?utm_source=rss&utm_medium=rss&utm_campaign=pretty-permalinks-wont-enable http://johnlamansky.com/wordpress/pretty-permalinks-wont-enable/#comments Fri, 08 Feb 2008 15:00:26 +0000 John Lamansky http://wordpress.jdwebdev.com/blog/troubleshooting/pretty-permalinks-wont-enable/ Have you tried to enable “Pretty Permalinks” but the change doesn’t show up on your blog?

I have, and I’ve successfully used this tactic buried in the WordPress Codex’s Using Permalinks article under the “Fixing .htaccess Generation Issues” section.

This only applies if your web host is using Apache (if you aren’t sure, chances are it is, but you might want to check with your host first).


Your host might have blocked the SERVER_SOFTWARE variable and this will cause WordPress’ .htaccess generation to fail. If you are sure that your server is running Apache, you can force WordPress to believe that your server is running Apache by changing your wp-includes/vars.php file. Follow the steps below to implement these changes.

  • Open the wp-includes/vars.php file using the built in file editor in your WordPress Admin panel. To navigate to this panel, login to WordPress, click on “Manage”, then on “Files”, scroll to the bottom and type in wp-includes/vars.php into the text box under the “Other Files” title.

    Look for

    $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;

    and replace it with

    // $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;

  • Add a new line under

    // $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;

    and type in

    $is_apache = 1;

Then click “Update File,” and try re-enabling permalinks.

Did this tip work for you? Have another permalink troubleshooting tip you’d like to share? Use the comments section below!

]]>
http://johnlamansky.com/wordpress/pretty-permalinks-wont-enable/feed/ 0