WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Steve Taylor v0.3.1

Lock Pages

Lock Pages prevents specified pages (or all pages), posts, or custom post types from having their slug, parent, status or password edited, or from bei …

Lock Pages

The facts

Rating
4★ from 2
Active installs
300+
Price
Free
Last updated
19 Dec 2018
Added
Nov 2009
Requires WP
3.0
Tested up to
WP 4.9.31
Downloads
18,177

Our analysis

AI-assisted

Lock Pages is a WordPress plugin designed to prevent non-admin users from making changes to important pages and custom post types. It allows administrators to lock specific items, restricting actions such as editing slugs, changing parent items, and deleting posts. This helps maintain the integrity of a site's structure and SEO by ensuring critical content remains unchanged.

The plugin is particularly useful for site administrators who need to safeguard certain pages from accidental modifications by editors. However, it has known limitations with the Quick Edit functionality and is not tested with the Gutenberg editor, requiring users to revert to the Classic Editor for compatibility.

Best for: Site administrators who need to protect important pages from edits by non-admin users.

What it does well

  • Locks pages and custom post types to prevent unwanted changes
  • Restricts editing of slugs, parent items, and deletion
  • Helps maintain site structure and SEO integrity

Where it falls short

  • Known issues with Quick Edit functionality
  • Not tested with Gutenberg editor
  • Limited updates since December 2018

Verdict

Lock Pages provides a straightforward solution for locking content, but its limitations and lack of recent updates may affect usability for some users.

From the developer

Steve Taylor's own description of Lock Pages, lightly tidied.

NOTE: This plugin is not tested with Gutenberg, and we have no near-term plans to do so. If using WP > 5.0, use the Classic Editor if there are problems.

NOTE: This plugin was originally designed to only lock pages, and only later added custom post type functionality. Hence the name, and sometimes the terminology will say “pages” when it means “any post type”.

Sometimes some pages or other posts are too important to allow them to be casually moved about or deleted by site editors. An editor may think nothing of renaming a page’s slug, or deleting a page to replace it with something similar, perhaps unaware of effects on SEO. Also, certain pages might be essential to keep in place because of a site’s structure, or because of aspects of a custom theme.

This plugin lets administrators “lock” any or all pages, and any post of any post type. “Locking” here basically means preventing non-admins from:

  • Editing the item’s slug
  • Changing the item’s parent
  • Changing the item’s template
  • Deleting the item
  • Changing the item’s status
  • Changing the item’s password protection

Locking is implemented by preventing the actual database update being performed as well as, where possible, having the interface element for that field removed. Where possible interface elements are removed via WP filters on the server; otherwise, jQuery is used on the client.

NOTE: Currently, I’ve been unable to get this working with the Quick Edit functionality. As a stop-gap measure, which is only in place because it seems to be better than nothing, the Quick Edit link is removed for users who can’t edit locked pages. I know, it’s not great. But until I work out how to selectively block Quick Editing, I’m assuming a locked page should be locked. Users can always edit the other fields via the normal edit page.

Go to GitHub for development code and issue tracking.

Known issues

  • Quick Edit presents problems. I’ve worked out how to create hidden fields in the Quick Edit box, and to put the values in the hidden div, but I can’t work out how to dynamically populate the fields with the values, so the old values can be used if necessary on saving. For now Quick Edit is blocked for users who can’t edit locked pages.
  • Although I’ve fixed the lock_parent function so it allows uploaded files to be attached to a locked page, it still prevents media already in the library from being attached when inserted.

Ideas

  • Include the locking checkbox for admins in the Quick Edit form.
  • On the settings screen, use a drop-down for selecting which capability is needed for editing locked page elements.
  • Implement a system to deal with descendants, e.g. an option to lock all descendants of a locked page or not.

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for custom content structures.

Ad Inserter

Manage Google AdSense ads, banners, ad rotation, sticky widgets, AMP ads, ads.txt, tracking, header and footer...

Free 300k+ installs 4.9★ (2,428)
Advanced Custom Fields

ACF helps customize WordPress with powerful, professional and intuitive fields. Proudly powering over 2 millio...

Free 2M+ installs 4.5★ (1,438)
Simple Custom Post Order

Easily reorder posts, pages, custom post types, and taxonomies with intuitive drag-and-drop sorting in the Wor...

Free 300k+ installs 4.8★ (569)
WP Activity Log

The #1 user-rated activity log plugin for event logging, activity monitoring and change tracking.

Free 300k+ installs 4.7★ (488)
Custom Post Type UI

Admin UI for creating custom content types like post types and taxonomies

Free 1M+ installs 4.6★ (276)