How to Restrict Admin Panel to Administrators Access Only

Hi friends, this is a very quick WordPress tutorial which demonstrates how to restrict admin panel to administrators access only.

This is the best idea to keep away your website users from admin area access. This is the very simple function which restricts non-admin users to visit the administrator screens.

Open functions.php file and copy paste below code at the end of the file and save it.

If you like this tutorial, share this with your friends via social media channel and also subscribe our newsletter to get the best tutorials directly in your email inbox.

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

Article Tags: , , , , ,