Wordpress requires FTP information to update plug-ins - wordpress

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.

Related

How can I make my ftp directory writable for wordpress plugin update?

I try to update a plugin in wordpress.
When I press on "update" they ask me for my ftp settings.
Then the Plugin tries to update and I get the error
Update failed: Directory could not be created.
I changed the folder permissions on 770 recursive for the plugins folder. But still not working.
Generally if this happens I like to reset all the file/folder permissions on the site https://gist.github.com/Adirael/3383404 is a sh file that will do this, if you dont have ssh access a lot of dashboards will have a reset permissions utility that may do the trick.
Alternatlvy find out the FTP credentials for the site and complete the form this should work.
There are extensions that claim to be able to do this however I would advise not using them as the process is pretty simple and they may introduce other issues especially as from the sounds of it you wouldnt be able to install the extensions.

Giving write permission back to Wordpress on AWS EC2 via PuTTY

I recently had a PHP syntax error that crashed my server after using the plugin editor on my Wordpress website. It is an AWS Elastic Beanstalk hosted website, so I had to use PuTTY to change the file permissions and allow ec2-user to read/write durring SFTP via Filezilla.
I am not experienced with his sort of thing and followed the information from this question to accomplish this task.
Everything went well, but now I cannot edit or "write" anything via my Wordpress website. No plugin updating, no file editing, nothing. It says I need to change my permissions.
Due to my lack of knowledge on this, I have no idea how to reverse what I did when I entered
chown -R ec2-user /var/app
chmod -R 755 /var/app
How do I set the permissions back so I can edit files and update plugins via Wordpress admin?
EDIT: I found out that all I did was change ownership of the files to ec2-user. SO I guess my new question is how do I find out what username to use for my WordPress site to give it back ownership of the files?
Fixed:
I wound up adding
echo(exec("whoami"));die();
to the top of my WordPress index.php file to figure out the user. Make sure to remove it once you're done.
Lets say my username wound up being "foo".
After I had the username, I went back into PuTTY, and ran
sudo chown -R foo /var/app
and can now modify files through wordpress again.

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

Wordpress permission problems in centOS

I've installed wordpress on Centos (apache) and i was having problems to let wordpress automatically perform certain tasks like updating plugins and making changing to theme files in editor. I studied about permissions in wordpress codex and i made changes to the files permission in my /var/www/html directory. I set all the directories to 0775 and all the files for 0664 but the thing is still not working.
I think that it has something to do with the users. I think that wordpress is not set as the appropriate users to do those tasks. Please tell me what to do.
It sounds like it's an issue with ownership rather than permissions.
Login using SSH.
Run the following command:
sudo chown apache:apache /var/www/html
This changes the ownership of your web root to the web server allowing WordPress to write files (perform automatic updates etc).

Could not remove the old plugin

I'm trying to update the plugins on my clients site and I'm getting this error for multiple plugins. He's using plesk.
Downloading update from https://downloads.wordpress.org/plugin/awesometastic.131026.zip…
Unpacking the update…
Installing the latest version…
Removing the old version of the plugin…
Plugin update failed.
An error occurred while updating Awesometastic Plugin: Could not remove the old plugin.
I'm sure it's got something to do with directory permissions, although, could someone explain to me what the possible issues are and how to fix this?
Thanks!
It's a permissions issue. Run this on SSH:
chmod -R 0755 /var/www/<yourpathtowordpress>/wp-content/plugins
chown -R www-data /var/www/<yourpathtowordpress>/wp-content/plugins
The first grants writing permissions, while the second ensures the user who needs the permission is correctly set
WordPress does not display OS level errors by default but this is most definitely a permission issue on your plugins folders in your site's wp-content/plugins.
You could enable debugging in order to see the original error which triggered the more generic one you've seen if you want to work with a better view of the world.
Multiple debugging options are documented in WordPress' online manual. To enable debugging and log messages set the following variables in wp-config.php:
Enable debugging via WP_DEBUG
define('WP_DEBUG', true);
Enable logging debug messages to the /wp-content/debug.log file with WP_DEBUG_LOG
define('WP_DEBUG_LOG', true);
You should probably make sure to disable these options and delete the debug.log file after gathering enough information as they could contain server information you do not want to be accessible publicly through your WordPress installation.
Alternatively we can try to guess what the most plausible cause can be:
If you installed your plugins manually on the server and not via the
WordPress administration console it is likely you did it as a
different user then the one who is executing WordPress' PHP code and
thus requires proper access to perform such OS operations.
Finally the solution may be to fix the permissions or upgrade the plugins manually.
Basically this is permission issue.
and you will have to provided or make FTP user as owner of the plugins folder.
Most of the cases where you will be using same user for WordPress install and run as well as FTP access. If you are using different users for both above purpose then providing ownership to FTP user will fix this issues just like that.
Ex:
chown -R ftpadmin /var/www/wordpress/wp-content/plugins
Hope this would be helpful if any body at this stage.
first you have to delete the old plugin than update
If you have SSH access to your blog
Login your site via SSH.
Use SSH commands to nagivate “../wp-content/plugins/”.
type the given command to see all files and folders in the plugin folder
ls -al
Search for the particular plugin folder in the list.
Next, type the given command to delete that folder.
In the command, replace the folder name with your plugin folder name which is you want to delete.
rm folder name
now you're able to delete your old plugin.
Hi this is the permission issue at wordpress so follow this command
sudo chmod -R 0777 /var/www/html/thewayivogue/wp-content/plugins
like this where thewayivogue replace to your folder name.
Open FTP ank kill em all :)
Then reinstall those plugins. It is better not to open admin panel while removed so you have it still activated.
But do backup. It can Save Willy

Resources