Change Media Upload Directory
-
Hi
I have an online shop in wordpress. I want to use another folder outside wp-contents for my products image files and don’t like the uploads/ year and months folder making of wordpress. So the final link to the uploaded picture will be: mysite.com/pics/pic1.jpgWhat I did:
1. from Setting > Media > I un-tick the Organize my uploads into month- and year-based folders
2. in wp-config.php I added this in last line:
define( ‘UPLOADS’, ‘pics’ );
3. uploaded a picture for a product.It is uploaded, but wordpress can’t show that picture and its URL is shown like this:
https://mysite.com/wp-content/uploads//home/mysitecpaneluser/public_html/pics/pic1.jpgI see the picture in correct folder with other required sizes which are auto generated. But the problem is the URL. it can’t be shown in product tab and also in media library.
I searched some forums and no one declared a problem like this. some just mentioned the folder permissions which I tested (like 755 and 744) but no success.
the URL is totally wrong.
If I use a folder in wp-contents, it will be OK, but outside wp-contents generate that URL problem
- The topic ‘Change Media Upload Directory’ is closed to new replies.