How to secure Upload Directory of WordPress?

1799

How are you all? I hope all of you are fine. Today I will discuss with which subject that is “How to secure upload directory of WordPress“.

Security plays a great role for any website. Generally WordPress is more secure. But you can improve WordPress security if you want. Through today’s tutorial we will know that how to secure upload Directory through. Htaccess, make a file with the name of. htaccess in only some particular file extension and paste following codes. If the paste is completed, then upload files wp-content/uploads directory.

Protect Upload Directory Of WordPress.

wordpress-security

This example is given only for Image File. You can give here any file like .pdf according to your need. Add your favourite format in five number line.

<Files ~ ".*..*">

Order Allow,Deny

Deny from all

</Files>

<FilesMatch ".(jpg|jpeg|jpe|gif|png|tif|tiff)$">

Order Deny,Allow

Allow from all

</FilesMatch>

Thank you for reading this article. I hope this post will work for you. If there is any mistake, then forgive me. If you face any problem, then don’t forget to comment. If you think the article is beneficial then obviously share it.

Also read: