0
votes

I have created a new Wordpress website on my server and done everything as I normally would (nothing fancy or custom, just upload theme, a couple of plugins etc.) except I wanted a custom file path to my media folder.

I have created the folder '/public_html/i', updated my .htaccess file, updated the Setting > Media section in Wordpress with the file path and all is working fine.

My issue is that I do not want the uploads folder to be visible by navigating to the URL (www.site.com/i/). If I change the folder permissions to execute only for group / world (711) the images become unavailable / unviewable and although I can still upload they show as broken images. If I set to execute and read (755) the images and uploads work fine but the folder can be viewed by typing in the URL.

What are the correct permissions I should be using for a custom uploads folder to make images on the site viewable but the containing folder itself not? Note that this is a site that will regularly have new images uploaded to it, so I would also need to be able to upload without having to change the permissions each time, which is one solution I have found online.

Thanks in advance for any help.

1

1 Answers

0
votes

Add the following to your .htaccess file with the WordPress .htaccess instructions:

Options -Indexes