your content folder is not writable wordpress - wordpress

Can somebody help me please. I have getting a headache. I recently moved my server. The website run as normal but when I try to add content. My wordpress site shown. "your content folder is not writable"
I have did changing the permission to 777 to recursive folders but it won't work. I also tried to change it from ssh which code
chmod -R 777 /home/admin/public_html/wp-content/uploads
surprisingly, the admin dashboard still show the same error. I really appreciate any helps. Thank you.

That's a server permission problem. According to the WP docs:
Any file that needs write access from WordPress should be owned or
group-owned by the user account used by the WordPress (which may be
different than the server account). For example, you may have a user
account that lets you FTP files back and forth to your server, but
your server itself may run using a separate user, in a separate
usergroup, such as dhapache or nobody. If WordPress is running as the
FTP account, that account needs to have write access, i.e., be the
owner of the files, or belong to a group that has write access. In the
latter case, that would mean permissions are set more permissively
than default (for example, 775 rather than 755 for folders, and 664
instead of 644).
From http://codex.wordpress.org/Changing_File_Permissions
And, FYI, search first for a common issue like permissions; there are many answers already on WP permissions.

Related

Wordpress User/Group issue

I used Plesk 12 to install Wordpress in an existing webspace, under the subdomain /new. Since the owner needed to still use some parts of the original site, I used PHP to redirect all domain calls to /new. The site works fine, but plugin updates fail with the "The update cannot be installed because we will be unable to copy some files" error. I have checked all file/directory permissions, and finally think it is a file ownership issue. Plesk expects files to be owned by the user of that account, and group set to psacln. Every Google article I find suggests that the group has to be something else, but they don't seem to take Plesk into account. The site is in shared hosting on a server I control. I keep thinking that Plesk is trying to load plugins to a default location, and is not aware of the actual location.
Can anyone suggest a work-around, or do I have to relocate Wordpress down one directory level? I don't want to install plugins manually. BTW, updating Wordpress itself works.
Thanks.
First you should wich account is doing the copying. Then you should check specificly what contents need to be copied. Check those file permissions. For copying you need to have atleast read and write permissions.
In this case, since you've created the install with plesk, the user doing the copying is plesk. So check the file permissions of the account on the old and the new install. Maybe by, as told in a previous answer, Setting the permissions back to basic.
# find /var/www/vhosts/example.com/httpdocs/new -type f | xargs chmod -R 644
If it doesn't help then i think you should step to manually once. Because once that you've placed the plug-ins manually you will not get the errors further more.
You can try to revert permissionos to default ones (644 for files):
# find /var/www/vhosts/example.com/httpdocs/new -type f | xargs chmod -R 644

Is there a better solution rather than changing wp-content folder persmission to 777 to prevent asking me to put ftp parameters?

I have a running wordpress website and the only issue I have is that each time I want to save an update it's asking me to enter my ftp password.
Is there a better solution to remove this popup without changing wp-content folder permission to 777?
I have run into this issue when the files on my web server are configured with the wrong owner or group.
From the WordPress codex:
Typically, all files should be owned by your user (ftp) account on your web server, and should be writable by that account. On shared hosts, files should never be owned by the webserver process itself (sometimes this is www, or apache, or nobody user).
https://codex.wordpress.org/Changing_File_Permissions
This is something that you will need to resolve on your web server if you know your user and group. Your username is likely the same as your FTP user.
chown -R user:group /path/to/wordpress
If you are on a shared hosting environment you will need to contact your host so that they can fix this problem.
You should also avoid using 777 permissions on your folders. Folders should be 755.

Issue with Wordpress Folders on Google Compute Engine

I'm migrating a WordPress site to Google Cloud using Click To Deploy. All as gone well so far except a folder permissions problem when migrated the current sites wp-content folder.
Steps I took to make this work...
I set up a new WordPress install by using Click To Deploy and tested that I could upload new images to the server.
Uploaded and installed my backup database and current site files. In other words, I overwrote the files on the new WordPress install.
Tested the site by changing my 'host' file to match the new Google Cloud IP.
All looks great on the front end but in the admin area I can no longer upload images for new posts or pages.
I know this is probably a permission issue but I can't figure it out. Please let me know if you have suggestions.
If you have a good sense that it's directory permission issues, a simple way to diagnose might be to create a new Google Cloud Project, create another click to deploy instance, ssh to /var/www and run ls -al and compare permissions between what you have today and what the default scheme is. You may have to descend down a few levels into the directory that holds user-uploaded files.
My guess is that when you copied your site onto your instance, you modified directories where your linux user account is the owner, and when you try to upload files, the www-data user (Apache) cannot write to those directories any more.
You shouldn't have any issues running chown when logged in via ssh. Please post the output or error messages of that command.

Wordpress requires FTP information to update plug-ins

I'm trying to update Wordpress plug-ins, and I'm presented with the familiar FTP login screen.
I have read other posts indicating the lines in wp-config.php to be filled in. However, I don't have FTP installed on this server, just SFTP.
Also, I don't want to have to do this for each Wordpress install.
As far as I know, wp-content is already owned by apache:apache, and PHP is also running as user apache.
Is there something I'm missing? Is there some other way to handle this?
This has happened to me alot, when installing wordpress on my own server. Usually it has to do with a permission problem.
A lot webservers use the user www-data, instead of apache. So check your apache configuration for what your webserver user is set to.
Also you will want to check your directory permissions, and make sure both the user and group has read, write, and execute access. I am not sure if execute access is necessary, but that is usually what I set my server too.
You can do this with the command
chmod 775 -r your_wp_content_directory
And if all else fails, if you have shell access you can also use wget in the directory to install plugins.
After trying everything I could find regarding permissions, I added the following line of code to this site's wp-config.php:
define('FS_METHOD', 'direct');
That immediately solved the problem. Not sure if I also needed to modify the permissions first, since i did that before trying this fix.

Give Wordpress apache user and FTP user write permissions

Apologies if I am missing something obvious, here is my issue:
My employer wants to be able to auto update Wordpress/Plugins from the dashboard using define('FS_METHOD', 'direct'); in the the wp-config (he doesn't want to run a password-authenticated FTP server). This requires setting the files to be owned by the apache user.
My employer also wants to be able to login via SFTP with a key and update files
If I make the files owned by the apache user, he cannot edit them via the SFTP user, and if I make them owned by the SFTP user, apache cannot modify them. I know I can use group permissions, but Wordpress file default is 644 which, if I am correct, means that only the owner can edit the files, not the group.
Is there any solution to this? Thanks!
EDITED: To clarify FTP/SFTP situation
Change the owner to 664 and create the group as you indicated, where is the problem?

Resources