New WordPress plugin: Lock Pages
I’m very please to announce my first WordPress plugin! It’s called Lock Pages.
The idea came from work with various clients where certain pages started to get moved around, or just vanished. A page can “move” by having its parent page or the slug changed. Sometimes clients would delete a page and replace it with an updated version which had a slightly different slug.
Of course, many of these things just stem from usually harmless habits picked up from working with files on a computer. But on a website, you want to persist your URLs as long as possible. Unless absolutely necessary, pages should be kept with the same permalink, to avoid breaking links and to maximize PageRank and such like.
So, I created this plugin that lets you either lock all pages, or just particular pages. A page being “locked” means the slug can’t be edited, the parent can’t be changed, and it can’t be deleted. (Although, of course admins can still do these things.)
There’s a little more to it than that, but not much. It’s relatively simple. I’ve not yet got it going on any production sites, so technically it’s still in beta. But I’ve given it enough testing now to feel it should be announced. And yes, when I find a moment and I’ve tested it on production sites, I’ll prep it for release on the wordpress.org plugins repository.
Anyway, do check it out and let me know what you think…
Welcome! I build websites - mostly based on the brilliant, free & open 

sebastien | ARCHIparmentier (20th February 2010)
Very good plugin. It only lacks one thing. We ought to enable this option directly wp-admin/edit-pages.php. We could then lock multiple page at once. Is it possible to add this feature? :-))
Steve Taylor (20th February 2010)
Thanks for the feedback! I agree this would be a nice feature, but at the moment I’m not even finding time to properly test it on new WordPress versions and other basic tasks. (I believe it does work fine, but I know I should do some proper testing before officially increasing the compatible WP version.) Anyway, my experience is that I know a page is one that needs to be locked when I create it, so actually I’ve not encountered the need to adjust the lock outside the single page edit screen.
Naturally, if someone really needs this feature and wants to contribute some code… :-)
Javier (24th March 2010)
I’ve translated the plugin Lock Pages into Spanish. If you are interested in the SLT_LockPages-es_ES.po file email me. Some strings that are not available for translation are:
- Lock Pages
- Save changes
A greeting
Steve Taylor (24th March 2010)
Wow, many thanks Javier – I’ll be in touch and get the language file integrated soon.
Jason (30th April 2010)
This plugin is absolutely fantastic. What I needed to ‘lock’ some pages from non-Admin users.
I hoped that there was another feature of locking out the edit-ability of the locked page. That’ll surely be a complete lock of the page.
Any ideas for get this done? Cheers!
Steve Taylor (30th April 2010)
Jason, this feature is being requested a lot. My #1 idea for getting it done is finding some time to do it – unfortunately this part of the plan is proving hard to implement ;-)
Any developers out there with time to contribute?
Jason (30th April 2010)
Hi Steve,
One plugin which is truly amazing, which completely locks out a page is the Lock posts WordPress MU plugin (http://wpmu.org/lock-posts-or-pages-from-being-edited/). Sadly, it’s only meant for WPMU … Sigh*
I’ll try to figure something out soon.
Jason (5th May 2010)
This “Lock Posts for WPMU” plugin can be tweaked to fit the ordinary WP. How? Simple …
Just edit the “lock-posts.php” file, and find this WPMU function reference – is_site_admin(). The equivalent for WP is – current_user_can(‘manage_options’). Just replace two parts within that file, and you’re done.
Instructions to install are similar. Easy, isn’t it?
Happy Blogging!