Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Apache2 and Wordpress
PostPosted: Thu Jun 10, 2010 12:13 pm 
Offline
Senior Newbie

Joined: Sat Feb 20, 2010 5:28 pm
Posts: 15
Hey guys, I'm having a little trouble setting up Wordpress. I have virtualmin installed as well. When trying to update wordpress or add themes/plugins, I receive "The uploaded file could not be moved to xxx/xxx/xxx/wp-content/uploads" . I checked on google and wordpress forum and couldn't find an answer. I've been told that this is a server setup issue with Apache not having the correct permissions to the website directory.

Is anyone familiar with this issue?

Thanks.


Top
   
 Post subject:
PostPosted: Thu Jun 10, 2010 1:02 pm 
Offline
Senior Member
User avatar

Joined: Fri Dec 11, 2009 7:09 pm
Posts: 168
Probably not the best way to do it, but I chown'd public_html and everything below it to www-data:www-data (which is Apache on my Debian install).

_________________
--
Chris Bryant


Top
   
 Post subject:
PostPosted: Thu Jun 10, 2010 1:08 pm 
Offline
Senior Newbie

Joined: Sat Feb 20, 2010 5:28 pm
Posts: 15
Thanks for the help.

I'm also on Debian, 5 32-bit. I tried your solution and it still gives the same error. I'm thinking it has something to do with the way virtualmin configures each new website, which i'm really unfamiliar with.


Top
   
 Post subject:
PostPosted: Thu Jun 10, 2010 4:03 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Not sure how Virtualmin configures users and permissions, but there's an easy way to find out.

Create a file with the following content, and name it whoami.php
Code:
<?php passthru('whoami'); ?>

Place it in your Wordpress public_html directory, and browse to it. It'll display the name of the user who is running the script. DELETE THE FILE IMMEDIATELY, AS IT MAY BECOME A SECURITY PROBLEM IF SOMEONE ELSE SEES IT.

Then you can chown the Wordpress files so that the said user can modify them.

If this doesn't work, check if you have safe_mode enabled or disabled in your PHP configuration.

BTW, I don't think it's a good idea to chown the entire public_html directory. Most of the time, Wordpress only needs to write inside the wp-content directory. The only exception is when Wordpress wants to update itself, or when a plugin wants to modify the .htaccess file. Those cases don't happen very often, so you should normally keep those files from being writable.


Top
   
 Post subject:
PostPosted: Thu Jun 10, 2010 8:50 pm 
Offline
Senior Newbie

Joined: Sat Feb 20, 2010 5:28 pm
Posts: 15
@hybinet Thanks for your help. I ran the script and the user running the script currently owns the entire public_html directory and all the files under it. I checked and php safe mode is turned off.

I tried uploading a plugin, about 650k in size and it worked, however i tried uploading a theme, which is 2.2 megs and it I receive the error message? My max file upload in php.ini is 8M so I don't think that's the issue. It's really odd, it seems like wordpress is timing out, anywho, I will try to increase the timeout value and see if that helps.

Thanks again.


Top
   
 Post subject:
PostPosted: Thu Jun 10, 2010 9:05 pm 
Offline
Senior Newbie

Joined: Sat Feb 20, 2010 5:28 pm
Posts: 15
Please disregard the last post, the issue is resolved. I restarted apache and it started working


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group