Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm working with Wordpress 3.3.1 on a local installation. I've uploaded an image file and it doesn't show up.

The base directory is a symbolic link /var/www/wordpress/ that leads to /usr/share/wordpress/

The file exists here: /srv/www/wp-uploads/localhost/2013/01/Logo.png

Wordpress thinks the file is here: http://localhost/wordpress/2013/01/Logo.png (Apache gives 404)

How can I configure Apache or Wordpress to get the correct file?

I'm confused because /srv/www/localhost/ contains the Wordpress files (as well).

Also, I've found questions related to wp-content/uploads but this directory doesn't exist.

share|improve this question
1  
Without knowing more about your setup, I don't think anyone could be much help. If you are running your WP blog locally using VirtualBox, I have some notes here. –  its_me Jan 8 '13 at 19:14
1  
Are these files you uploaded using the WP uploader? Are you saying that the uploads are working, but not displaying the files afterwards? –  totels Jan 8 '13 at 19:18
    
@totels, yes, the uploads are working, but the files are placed where Apache doesn't find them. –  GUI Junkie Jan 8 '13 at 21:01
    
@its_me, yes, I'm running VirtualBox, I'll take a look at your notes. Thanks. –  GUI Junkie Jan 8 '13 at 21:02
    
@its_me, I've read your piece, but I'm only interested in localhost. This is a sandbox proyect to get my design sorted out. Once I'm done, I'll put it on the hosting server. –  GUI Junkie Jan 8 '13 at 21:52

2 Answers 2

I solved this by creating a symbolic link in the /var/www/ directory.

ln -s /srv/www/wp-uploads/localhost/ wp-uploads

This is probably an ugly hack and there must be something wrong with the Apache configuration, but it works for the Sandbox.

share|improve this answer

It would seem your permissions and / or ownership on /usr/share/wordpress/ could be wrong. Try setting this directory to 777 and CHOWN the owner to Apache (on Ubuntu it runs as user www-data).

If WordPress was unzipped/expanded in /usr/share/wordpress you would have a folder wp-content - and the /uploads folder should be created in there (assuming permissions etc are right).

You also mention /srv/www/wp-uploads/localhost/ and /srv/www/localhost/ -- so maybe you were changing your VHOST files too? Have you enabled mod-rewrite or anything different?

share|improve this answer
    
I have all the dirs and files as www-data and with 755 at least. I'm not aware of touching VHOST files. I did add mod-rewrite to an Apache file, but that was way after having the problems. –  GUI Junkie Jan 8 '13 at 21:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.