WordPress Plugin to Generate Post Slugs

If you have migrated your WordPress blog from another blogging platform but the post slugs weren’t generated, you can my Generate Post Slugs Plugin to have the slugs generated from the post title.

Why I Wrote This Plugin

I wrote this plugin for use on this very blog because when I ported my custom blog software entries to WordPress, I didn’t bother to generate slugs with the import script I cobbled together. A few weeks ago I made my URLs SEO-friendly and realized that all those posts I imported years ago were missing slugs.

License

By downloading, you acknowledge that this plugin is released under the GPLv2 License AS IS with no implicit or explicit warranty of fitness for any purpose. While I have tested the plugin with WordPress 3.2.1 and have used it to fix the slugs for posts on this very site, it is STRONGLY SUGGESTED that you make a backup of your WordPress installation prior to using it.

Getting the Plugin

If you accept the license terms outlined above, click here to download the Generate Slugs Plugin.

Installing the Plugin

Installation is just like any other WordPress plugin. On the plugin install page in your WordPress Dashboard, upload the zip file. Then activate the plugin under the Installed Plugins menu and follow the instructions provided there to use the plugin to generate your slugs.

I hope this helps someone.

8 Comments

kraudio

Hello, I tried for some time a plugin to generate the slug in an automatic way to my database, because this database imported from another system (cms).

Well, your plugin is working perfectly in my tests, but when I went to the generation of a database with lots of information, showed the following message:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /home/storage/4/c5/a9/animaorkut/public_html/kraudiorails/wp_teste/wp-includes/taxonomy.php on line 2616

We thank the attention and came in very handy plugin.

Trav

Hello Kraudio,

Glad the hear you found the plugin useful. It would appear that if you run the plugin on a WP installation with a large database that you may encounter a memory error (which is what happened in your case). If possible, you can remedy this error by setting the memory_limit php.ini directive to something higher. Yours appears to be set to 64MB. (Out of curiosity, how many rows are in your WP database?) Unfortunately, depending on your hosting situation, you are not always able to set the memory_limit directive. I may extend the plugin to allow for execution offsets which would keep the script from using too much memory on a single execution.

BassLine

Thanks this plugin! It has saved me to a lot of work!
Perfekt :)

Andrei

This tool is exactly what I’ve been looking for. Unfortunately the posts I want to generate slugs for is a custom post type and your plugin doesn’t seem to pick this up. Any quick way to remedy this?

Trav

Hey Andrei,

I’m sure there is a way to make the plugin compliant with custom post types, however, I don’t know how to right off hand. I haven’t touched the plugin in years (and have honestly forgotten what little I knew of making plugins) The slugs I needed to generate were for posts of the simplest type and I didn’t make the plugin super robust because it was just a get-it-done-and-forget-about-it thing. I’m sorry I’m no more help than this.

Pavel

Thanks for such a wonderful plugin!

How to make it process more than 100 posts?

The plugin writes “Post slugs successfully generated for 100 posts” …

Leave a Reply

Your email address will not be published. Required fields are marked *