We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Can't update Wordpress or upload files Topic is solved
-
- Posts: 14
- Joined: Mon Apr 13, 2015 6:23 pm
Can't update Wordpress or upload files
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
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
-
- Posts: 14
- Joined: Mon Apr 13, 2015 6:23 pm
Re: Can't update Wordpress or upload files
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 ...
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
Re: Can't update Wordpress or upload files
ThenTim 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 ]
Code: Select all
chown -R user:user /home/user/web/userdomain.com/public_html/
-
- Posts: 14
- Joined: Mon Apr 13, 2015 6:23 pm
Re: Can't update Wordpress or upload files
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
Thanks Skurudo
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
-
- Posts: 1
- Joined: Thu Aug 20, 2015 11:27 am
Re: Can't update Wordpress or upload files
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.
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,
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');
Best Regards,
Re: Can't update Wordpress or upload files
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!)
I replaced it with just "user" and it worked.
(Replace 'user' with your actual user details!)