Custom Permalinks is a Wordpress plugin that gives you ultimate control over your site structure.
Lay out your site the way you want it. Set the URL of any post, tag or category to anything you want. Old permalinks will redirect properly to the new address.
Download
Download Custom Permalinks for Wordpress from the Custom Permalinks Wordpress plugin page.
If you like Custom Permalinks, please consider buying one of my products.
Installation
- Unzip the package, and upload ‘custom-permalinks’ to the ‘/wp-content/plugins/’ directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Edit any post, tag or category to set a custom permalink.
Configuration
- Open or create a post, tag, or category.
- Under ‘Custom Permalink’, type in a URL, not including the http://domain part of the address.
- Save
Now, the post/tag/category will be accessible at the custom address.
Incoming visitors from old links will be redirected via a 301 redirect to the new address.
See Custom Permalinks in action right here! (See the address you’re currently at?)
Notes
Interacting with other plugins which modify the URL
If you notice that some plugins, such as Keyvan Minoukadeh’s Paged Comments plugin, are not operating correctly, then ensure that your custom permalinks have a trailing slash (or not, if your standard permalinks do not have trailing slashes).
The Paged Comments plugin, and possibly others, work by adding a path component to the URL to signify state (eg. /comment-page-1), then hiding that path component from Wordpress.
If you have a custom permalink with a different trailing / configuration to your normal permalinks (i.e., your custom permalink has a trailing / when others don’t, or vice versa), you will notice that these plugins no longer work, because Custom Permalinks is correcting the URL, which overwrites the plugin’s changes.
If you notice this happening, make sure you have a trailing / on your permalink, or remove the trailing slash if your standard permalinks do not have a trailing /.
Hiding the custom_permalinks custom field
A user recently asked for this; I’m not going to include it in the plugin (some people, including me, want to see this field, because we set it manually sometimes), but I’m happy to make a plugin-let to make it happen.
Here it is: hide_custom_permalink_field.php.zip
Put it in your wp-content/plugins folder and turn it on in Plugins under WP admin.
History
Version 0.5.2: Bugfix for matching posts when there are multiple posts that match parts of the query
Version 0.5.1: Compatibility fix for WP 2.7’s tag/category pages
Version 0.5: Support for installations in subdirectories (i.e. not located at the webroot). This should make Custom Permalinks start working for many people.
Version 0.4.1: WP 2.7 compatability fixes; fix for bug encountered when publishing a draft, or reverting to draft status, and fix for placeholder permalink value for pages
Version 0.4: Added support for pages, and fixed a bug concerning post drafts.
Version 0.3: Largely rewritten to provide more robust handling of trailing slashes, proper support for trailing URL components (eg. paging)
Version 0.2: Added management page to display all custom permalinks, with an option to revert selected items
Version 0.1.1: Fixed problem with categories
Version 0.1: Initial release
Related posts
- Taking the 404 further Update: I have now written a Wordpress plugin that does...
- Flickrpress 1.0 I’ve just finished a new release of my Flickr plugin...
- Smart 404 for Wordpress Save visitors to your Wordpress site from unhelpful 404 errors!...
- Private Tags Wordpress Plugin The “Private Tags” Wordpress plugin allows users to specify a...
64 Comments
Thanks Mike! I was able to figure it out. Your quick with this! So how did you insert the fancy little icon in the address bar for elegant grunge? I have a .ico but im not sure how/where to place it.
Nick, Cool! You need to call it ‘favicon.ico’, and put it either in the webroot, or in the ‘wp-content’ directory.
I suggest you post any more questions over on the theme page, so others can see them, as this is page is for the Custom Permalinks wordpress plugin.
Hi,Mike. I have some trouble with you plugin. When i added new post, custom permalinks saves in format ?p=48. But template of my permalinks is %category%/%postname%/ . And links in this format to the posts dont`t work. And i need fix custom link manually. My version of wordpress is 2,5.
Just a note, this plugin appears to work fine in 2.7 – I just upgraded my blog and it seems to be working fine. Let me know if there are problems.
Hi, last week I tried WP 2.7 RC1 and it seems the plugin had some sort of error wherein my custom permalinks got whacked.
ex. http://www.newdemonstration.co.cc/quotes/etcetc/ becomes… http://www.newdemonstration.co.ccquotes/etcetc/
the “/” for some reason gets appended deeming the link to be unreachable. Thus, I reverted back to WP 2.6.5 stable.
Do you think this issue won’t appear on WP 2.7 Stable?
It’s hard to say – It works perfectly for me, after upgrading to 2.7 today. If you have a problem, let me know.
there are definitely problems. try writing a page, saving as a draft, re-editing, restoring an autosave, then finally publishing and it automatically gives that page a custm permalink, which you can only delete by going to manage = > custom permalinks, it doesn’t work directly from the write page tab…
0.4 of your plugin and wp 2.7 final
Will try tomorrow. Hopefully I’m brave enough to do it by then. I don’t want it whacked again. It’s frustrating.D:
Will report back by then.
Same problem still persists.
Righto. I’ll check it out soon.
Thank you. I appreciate that, and many others too I believe that use your plugin.
Can’t wait to get on WP 2.7! I’m looking forward to it!:)
Advanced Happy New Year!:)
How’s the fixes going?
Cheers ;) And same to you!
Getting there with the next version, I’ve already fixed one problem – I’m just trying to sort through all the reports to try to replicate errors. I should have an update out in the next couple days – Will keep you posted!
Problem still persists with the .5beta that you’ve sent us.sob The back-slash after my site address still gets omitted for some reason.
Damn. I’ll get back to you in a few days!
http://newdemonstration.co.cc/quotes/jonathan-edwards/did-he-die-only-upon-probabilities <–like this custom permalink for example.
Hello! I’m very sorry for the hiatus – I got distracted for a while by some other things I had to do, but I’m back now. Is the plugin still not working for you?
very good , tanx
It i nice to find this plugin working for 2.7, however, the download link from wp.org is not working, can you make a mirror here on your site?
This plugin is exactly what I need! However, I can't get it to work. It installs fine, but my newly created URLs don't work. I keep getting errors that say "page not found". Any ideas on how I can fix this? As far as I can tell, there are no other plugins like this out there, and I desperately need it! Thanks for creating this.
Hi, thanks so much for this plugin! You rock! I don't understand why this isn't default for wordpress. I have the same trouble–404 errors all the way. :-\
I look forward to when you get it updated for 2.7!
Hello Brenton! Are you also having troubles with the plugin under 2.7? (I'm running 2.7.1 with Custom Permalinks with no problems); Still haven't found time to investigate the other problems yet, I'm afraid – my apologies, it's definitely on the to do list still.
Yes, I was, but I did a re-design today and now I actually want them to be done by dates, so I uninsulated your plug-in–great though it is. :)
I'm sorry to hear that Bob! Can you let me know your Wordpress/PHP versions, for starters? I'm aware that there are a few issues currently, and haven't yet had the opportunity to have a look at them.
It's actually 2.5.1 I know I should update, but I've only ever had horrible problems with updates. I use so many custom templates and hard-coding, it takes me forever to update. Should there be issues with your plugin and WP 2.5.1?
Hmm I see! It seems quite probable that that's the problem – I can't really say for certain either way, because I haven't tested on 2.5, but I do know that the Wordpress API underwent a few changes since then, and I'm probably making use of them, as Custom Permalinks gets into the guts of WP somewhat to work.
One option is to copy your whole webroot over to a new folder, upgrade in there, and see if it works – then you can always roll back, or put the work in to upgrade (2.7 is brilliant, and well worth it in my opinion)
I finally updated to 2.7, and I still have problems. Right now I use the default permalink structure, and I just want to make some pages have custom url's. Any more ideas of what could be wrong? I just get a "Page not found" error every time I try to use a custom permalink…
Hi Mike,
I write blogs both in Chinese and English.Uunfortunately, my hosting company does not support utf8 codes on permalink, hence your plugin is perfect for my chinese posts.
However, I can't get it to work like others. My WP version is 2.7.1. Whenever I changed the permalink, it keeps showing a 'page not found' error. Do you have some clues or solutions yet?
Thanks for your help !
cheers Shirls
Hi Shirls – I'm sorry to hear that. This remains a mystery to me, as the plugin's worked fine on all of the WP 2.7+ installations I've tried it on so far – I'll keep trying, though.
Hi everyone – I've found a problem that may be the cause of the issues people have been having. Try version 0.5, see if it works for you.
I just uploaded the new version of the plugin, and I get the same problem – the "page not found" screen generated by my server. Would you be willing to check out my site and see if you can find out why? I'd be happy to pay for your time… I'm really liking the idea of this plugin, and it would make my day to have it work! Thanks.
Hey guys if you are having problems with Wordpress 2.7.1 then do the following:
Go to the permalinks page by clicking on "Permalinks" which is under settings tab on the left side.
select "Custom Structure" and next to it type in "/index.php" (without quotes)
Click Save Changes
Done.
btw you cannot put _ or ( or ) etc in ur custom permalinks while your making a post or page.
Hi I'm trying to use this plugin (0.5.1) on a development site (WP 2.7.1) and my permalink structure is: /%category%/%postname%/
When I clicked on a category (eg: beginners), it used to be http://blah/category/beginners
I wanted to use this plugin so it would just be http://blah/beginners
It works for the category heading, but when I click on an article within that category, eg: http://blah/beginners/this-beginner-article I get a 404.
Any idea of the problem?
Cheers
Hi, Mike,
I'm not sure I understand your original problem – if you've got a permalink structure as /%category%/%postname%, then where does the literal "category" part come from (as in /category/%category%/%postname%)? If I do it on my development installation of WP 2.7.1, all my categories show up at the root (eg. http://wordpress/uncategorized), and the posts within show up as http://wordpress/uncategorized/test-post.
Also, I can't seem to replicate your problem – if I use the above permalink structure, then apply a custom permalink to a category, load that category page, then try to click on an article within the category, it loads fine (although it loads with the original category slug, not the custom permalink, as the base – this is expected behaviour, as the alternative isn't supported in CP)
Perhaps if you make available a screenshot/complete summary of your permalink settings, as well as the settings for the category in question?