🔥Name Your Own Price🔥 for the 11-Point WP Security Checklist Smart PDF: [ Ссылка ]
Code from this video:
function remove_edit_menu() {
remove_action('admin_menu', '_add_themes_utility_last', 101);
}
add_action('_admin_menu', 'remove_edit_menu', 1);
In this tutorial I'm going to show you how to remove the Editor menu item from under the Appearance menu in your WordPress admin area.
Why is this important? For two reasons.
First, if a hacker successfully brute force attacks your website then they can edit theme files inside your admin area in order to insert malicious code. However, if they can't find the theme editor then they can't make those edits.
Please note that this isn't the best protection against brute force attacks and a hacker can work around this edit if they're savvy enough. Please see these videos for better brute force protection:
- Block specific IPs: [ Ссылка ]
- Limit WP-Admin access by IP: [ Ссылка ]
- Move the WordPress login page: [ Ссылка ]
Second, if you're creating a website for a client who likes to poke around in the admin area and play with things then there's a chance they will break the site through the editor. To prevent that from happening we hide the editor so they can't find it.
It is actually very easy to make this happen. All you have to do is copy and paste the piece of code from above into the main functions.php for the theme. Save the file and you're done.
Ideally, you would be using a child theme so that when the main theme is updated it won't overwrite the code.
Let's get this code into your functions.php file.
First, log into your hosting account, find the File Manager option and open the root of the website you want to work in. You can also do this via FTP if you prefer FTP.
Once the website root loads, open the "wp-content" folder. Then open the "themes" folder. Then find the functions.php file.
Into the top of the functions.php file paste the code from the top of this description. And you're done.
I hope this information helps you! If you have any questions leave a comment below or ping me @WPLearningLab on Twitter.
--------------
If you want more excellent WordPress information check out our website where we post WordPress tutorials daily.
[ Ссылка ]
Connect with us:
WP Learning Lab Channel: [ Ссылка ]
Facebook: [ Ссылка ]
Twitter: [ Ссылка ]
Google Plus: [ Ссылка ]
Pinterest: [ Ссылка ]
Ещё видео!