What is the difference between the wp-uploads
directory and the wp-content/uploads
directory? I am running Ubuntu Server 12.04 and recently installed WordPress using apt-get, but there have been a few problems.
Most of the install went into /usr/share/wordpress
including a wp-content
directory, but inside that, there is no upload
directory. Instead, in /srv/www
there is a symbolic link to the main directory, and a wp-uploads
directory. After changing the permissions of /srv/www
, I am able to upload things, but not access them via any URL.
Any ideas how to properly WordPress to serve stuff from /srv/www/wp-uploads
? Any ideas why it’s installed like that? Should I just delete it, and reconfigure to use wp-content/uploads
like everyone else?
Well, after lots of digging (before and after posting this question), I think I figured it out. As @s_ha_dum suggests, the reason behind the odd directory placement is likely a personal preference of the person who created the Ubuntu “wordpress” package. Perhaps it makes for easier partitioning of permissions, or it makes updates more safe (in case the entire wp-content directory is replaced).
In any case, my problem accessing uploads with a URL came from the fact that I configured the Apache virtual host myself. My configuration did allow FollowSymLinks
, but there was not a symlink in /usr/share/wordpress/wp-content
nor did I think to make an alias to the clandestine upload directory. After running sudo apt-get install wordpress
I ran the MySQL setup script (/usr/share/doc/wordpress/examples/setup-mysql
) but did not notice the example Apache2 config file at /usr/share/doc/wordpress/examples/apache.conf
. That would have helped.
In the end, I just created an upload
directory within wp-content
like normal people do, and configured for that. It worked like a charm. Then, because the repository version was a few versions old, I also had to manually upgrade to the latest version of WordPress, which worked refreshingly well! Ultimately, I hope this helps someone else out in the same predicament, but if I had to do it again, I would probably install from the WordPress website.