Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Can't update Wordpress or upload files Topic is solved

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
Tim Rowley
Posts: 14
Joined: Mon Apr 13, 2015 6:23 pm

Can't update Wordpress or upload files
  • Quote

Post by Tim Rowley » Wed Jun 10, 2015 4:38 am

I have two VPS's with Vesta CP. The first one works fine, just one Wordpress site using the default user admin.
With the second VPS I created multiple users as there are more than one site with different owners.
It appeared that the sites had all migrated fine but when I came to update plugins I was asked for FTP credentials, which I had never met before. I put the FTP credentials and the update began, it fetched the update files, unpacked them but then informed me that it couldn't create the directory. I have met a similar thing when trying to update the Wordpres core.
I tried uploading a plugin to the directory via Filezilla, but it was not visible in the Wordpress admin to activate.
I wrote a fresh post and embedded a YouTube video, but when I went to upload a photo but got the message "Unable to create directory wp-content/uploads/2015/06. Is its parent directory writable by the server?" It seems that the server does not have permission to write to the Wordpress installation.
I have checked the numerical permissions of the Wordpress files and folders and they are as they should be, files at 644 and folders at 755. I noticed that the next level up the public_html folder is set at 751, but I guess that is correct also.
Does anyone know what I need to do ?
Thanks, Tim
Top

joem
Posts: 378
Joined: Thu Nov 13, 2014 8:33 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: Can't update Wordpress or upload files
  • Quote

Post by joem » Wed Jun 10, 2015 8:43 am

Try this
http://forum.vestacp.com/viewtopic.php? ... 545#p27829
Top

Tim Rowley
Posts: 14
Joined: Mon Apr 13, 2015 6:23 pm

Re: Can't update Wordpress or upload files
  • Quote

Post by Tim Rowley » Wed Jun 10, 2015 7:08 pm

Thanks for the reference Joem

I guess that I'd change admin for each domain to the user owning that domain ? like my example below.
I guess so because I have created other users and the container 'admin' only has the default domain in it. but, maybe Linux has given 'admin' an elevated global status.
Some experimenting should show, but if anyone knows that would save me the time ...

Code: Select all

chown -R admin:user1 /home/admin/web/site1.com/public_html/wordpress
chown -R admin:user1 /home/admin/web/site1-A.com/public_html/wordpress

chown -R admin:user2 /home/admin/web/site2.com/public_html/wordpress
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Can't update Wordpress or upload files
  • Quote

Post by skurudo » Wed Jun 10, 2015 7:38 pm

Tim Rowley wrote: I guess that I'd change admin for each domain to the user owning that domain ? like my example below.
I guess so because I have created other users and the container 'admin' only has the default domain in it. but, maybe Linux ]
Then

Code: Select all

chown -R user:user /home/user/web/userdomain.com/public_html/  
where user is your user and userdomain - your domain
Top

Tim Rowley
Posts: 14
Joined: Mon Apr 13, 2015 6:23 pm

Re: Can't update Wordpress or upload files
  • Quote

Post by Tim Rowley » Thu Jun 11, 2015 10:18 pm

Thanks, that's got me out of this spot

I ran the command shown (first line) and found that I could update plugins (which are in a subfolder) but the Wordpress core failed. I then took off the trailing slash and was able to change Wordpress also. on the second site I did I found that the command without the trailing slash got all the subdirectories and did it all first time

Code: Select all

chown -R user:user /home/user/web/userdomain.com/public_html/

chown -R user:user /home/user/web/userdomain.com/public_html
Thanks Skurudo
Top

Avidproducers
Posts: 1
Joined: Thu Aug 20, 2015 11:27 am

Re: Can't update Wordpress or upload files
  • Quote

Post by Avidproducers » Thu Aug 20, 2015 5:49 pm

I know how to fix this and it took me forever to find the solution. You don't need to fix the permissions on the files unless you are having issue manually updating theme or files through an FTP ect.

So here is the solution:

1. chown -R user:user /home/user/web/userdomain.com/public_html/
~ Make sure user:user as well as userdomain.com, is changed above. This allows permissions to edit files and folders for the given directory. Even though it will restore WP back all the way its still recommended to do.
2. Open your wp-config.php file located in your Wordpress root install directory
3. Scroll to the bottom on the page and use the code below.

Code: Select all

/** Apply fix to WP after moving servers*/
define('FS_METHOD','direct');
This will fix for the issue of updating Wordpress when you move your files from one configuration environment to a new server config. I hope this helps a lot of people save a load of time!


Best Regards,
Top

jackdh
Posts: 3
Joined: Sun Aug 27, 2017 3:13 pm

Re: Can't update Wordpress or upload files
  • Quote

Post by jackdh » Mon Mar 12, 2018 10:00 am

For anyone else getting a missing user for "user:user"

I replaced it with just "user" and it worked.

(Replace 'user' with your actual user details!)
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Can't update Wordpress or upload files
  • Quote

Post by skurudo » Mon Mar 12, 2018 11:15 am

jackdh wrote: ↑
Mon Mar 12, 2018 10:00 am
(Replace 'user' with your actual user details!)
It's example as you can see ;-)
Top


Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password