Steve Taylor photo

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 plugins repository.

Anyway, do check it out and let me know what you think…


  1. sebastien | ARCHIparmentier avatar sebastien | ARCHIparmentier

    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? :-))

  2. Steve Taylor avatar Steve Taylor

    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… :-)

  3. Javier avatar Javier

    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

  4. Steve Taylor avatar Steve Taylor

    Wow, many thanks Javier – I’ll be in touch and get the language file integrated soon.

  5. Jason avatar Jason

    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!

  6. Steve Taylor avatar Steve Taylor

    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?

  7. Jason avatar Jason

    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!

Comments are closed.