on WordPress website, how to disable anyone, including all admins to add new plugins. I want to be able to add plugins only via ftp, so no one can add them from WordPress menu.
Is there a custom function for this or any similar code? I searched but could not find any simple solution without any plugins that restrict access. I need solution without any extra plugin.
Thanks a lot.
2
Answers
Add this to your
functions.php
file. Get the specific users and remove their roles.Just remember when the capability is removed then it is gone for good. If you change your mind you can use this to add the capability again.
To disable plugin installation in wordpress admin panel, the following code can be put in file "wp-config.php".
It can be checked, if it works.