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.
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 folderwp-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?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.