How to disable PHP files execution in these directories
Create a text file in following directories.
Rename this text file to .htaccess
Add following codes in each .htaccess file and save the file.
# Disable php execution. <Files *.php> Order allow,deny Deny from all </Files>
You can also perform same task by just few clicks using Sucuri Security plugin.
Install the plugin and from Settings -> Hardening Options you can apply these securities by just few clicks.
I hope this article was helpful to you. If you know any other method or plugin, please comment below.