Reputation: 1148
I want to add a plugin to a live site, but I suspect the pages it creates will need some tweaks. I'd prefer users not be able to access these pages.
I realize I can just hide these page links, but I'd prefer to also have them inaccessible even if the user knows the URL.
How can this be accomplished through .htaccess for numerous Wordpress-generated pages, to disallow all but allow a couple IPs access?
The code I've come across are for directories/explicit files and doesn't seem to work when substituting in the /wordpress-page/ slug name.
Upvotes: 1
Views: 87
Reputation:
Well you don't just want to hide the pages, you also need it to not appear in searches, on category pages etc. So you really need something that works within WordPress. Hiding the pages by IP would only hide the page itself, it would still appear in other areas of the site.
The best way to do this is probably the WordPress visibility feature. It's a core feature so no plugin required. Just set the visibility to private on all the pages and only admins will be able to view them. See the link for more info.
Private – Pages are only visible to blog Editors and Administrators. Private pages are not visible in the Reader, feeds, or in any search. A page can be private without being password protected.
Upvotes: 1