Disable PHP File Execution in Specific WordPress Folders
-
I have red a page about security. I wanted to ask you if you’d recomend to me the following:
“Hackers may want to install and execute a PHP script in your WordPress folders. WordPress is written mainly in PHP, which means you cannot disable that in all WordPress folders.
However, there are some folders that don’t need any PHP scripts, such as your WordPress uploads folder located at
/wp-content/uploads.You can safely disable PHP execution in the uploads folder, which is a common place that hackers use to hide backdoor files.
First, you need to open a text editor like Notepad on your computer and paste the following code:
<Files *.php> deny from all </Files>Now, save this file as
.htaccessand upload it to the/wp-content/uploads/folders on your website using an FTP client.”Is this code still usefull and updated?
I would also like to add that at the moment there are a lot of folders in this directory but I think they are of no use, they often have the name of plugins that I no longer use, I think that for security it is better to keep only what is needed, also to understand more quickly if there are malware files, I would like to be sure not to delete things useful for the functioning of the site
The page I need help with: [log in to see the link]
The topic ‘Disable PHP File Execution in Specific WordPress Folders’ is closed to new replies.