We prohibit deleting plugins and editing the template from the admin panel
Recently once again, while climbing the expanses of the Internet, I came across an interesting article about how you can use standard means WordPress prohibit users of your site and you yourself from editing the template from the admin panel and deleting plugins. I think the code can be useful if you want to open access to the site's admin panel for your users, well, additional protection against hacking. So, you need to define constants in the file wp-config.php. Add these constants to any free space in the settings file.
Code Example:
1 2 |
define( 'DISALLOW_FILE_EDIT', true ); define( 'DISALLOW_FILE_MODS', true ); |
To cancel these settings, just remove the variables from the wp-config file.php. It couldn't be easier. Good luck in website development.
/*
- Basic web design course;
- Site layout;
- General course on CMS WordPress and continuation of the course on template development;
- Website development in PHP.