I've just recently installed a local installation of Wordpress 3.5.2 on my laptop, running ubuntu 12.10. I installed following the guide from here. So far, everything else is working, except I cannot upload any media files via Media Library -> Add New
.
The file seems to upload as the progress bar climbs from 0 to 100%. However after that, wordpress cannot display the thumbnail or the image anywhere. After looking at the uploads folder, it's empty. So I figured it's a permissions problem, after following directions from the support forums, no dice.
Wordpress is installed to /usr/share/wordpress
. The uploads folder is by default in /var/lib/wordpress/wp-content/uploads
. I've got 755
for wp-content/
and 777
for uploads
. Folders are owned by www-data
.
I can't see any errors, the files merely won't appear anywhere. I can manually copy files to the uploads/
folder as any user because of the permissions and I can view http://localhost/wordpress/wp-content/uploads/file.jpg
with a web browser. I have no themes or additional plugins installed. I've added define('WP_DEBUG', true);
to my config-file but no errors are displayed.
EDIT: Here's a line from /var/log/apache2/error.log
if it's of any help.
[Thu Jun 27 22:35:02 2013] [error] [client 127.0.0.1] PHP Warning: Creating default object from empty value in /usr/share/wordpress/wp-admin/includes/update.php on line 92, referer: http://localhost/wordpress/wp-admin/upload.php
EDIT2: Here's are example directory listings with permissions
msvalkon@Lunkwill:/var/www$ ll
total 20
drwxr-xr-x 2 www-data www-data 4096 Jun 27 12:21 ./
drwxr-xr-x 15 root root 4096 Jun 7 10:06 ../
-rw------- 1 www-data www-data 46 Jun 27 12:21 .bash_history
-rw-r--r-- 1 root root 200 Jun 27 11:46 index.php
-rw-r--r-- 1 root root 11 Dec 14 2012 .profile
lrwxrwxrwx 1 msvalkon www-data 21 Jun 20 11:45 wordpress -> /usr/share/wordpress//
msvalkon@Lunkwill:/usr/share/wordpress$ ll
total 164
drwxr-xr-x 5 msvalkon www-data 4096 Jun 27 13:41 ./
drwxr-xr-x 349 root root 12288 Jun 20 11:51 ../
lrwxrwxrwx 1 msvalkon www-data 23 Sep 13 2012 .htaccess -> /etc/wordpress/htaccess
-rw-r--r-- 1 msvalkon www-data 395 Jan 8 2012 index.php
-rw-r--r-- 1 msvalkon www-data 9202 Sep 13 2012 readme.html
-rw-r--r-- 1 msvalkon www-data 4264 Dec 14 2011 wp-activate.php
drwxr-xr-x 9 msvalkon www-data 4096 Jun 27 12:48 wp-admin/
--- SNIP ---
drwxr-xr-x 5 msvalkon www-data 4096 Jun 27 12:48 wp-content/
msvalkon@Lunkwill:/var/lib/wordpress$ ll wp-content/
total 28
drwxrwxrwx 7 msvalkon www-data 4096 Jun 27 12:58 ./
drwxrwxrwx 3 msvalkon www-data 4096 Jun 5 18:17 ../
drwxrwxrwx 2 msvalkon www-data 4096 Sep 13 2012 blogs.dir/
drwxrwxrwx 2 msvalkon www-data 4096 Jun 27 12:48 languages/
drwxrwxrwx 2 msvalkon www-data 4096 Jun 27 12:48 plugins/
drwxrwxrwx 2 msvalkon www-data 4096 Jun 27 12:48 themes/
drwxrwxrwx 2 msvalkon www-data 4096 Jun 27 13:17 uploads/
/var/log/apache2/error.log
but I don't think it's very helpful.www-data
group?