Install WordPress themes in a Google cloud instance - wordpress

I'm using a Google Cloud instance and I have set up Apache2, MySQL and PHP (LAMP).
I then downloaded and installed WordPress.
However I cannot install themes and plugins via wp-admin. WordPress asks me for an FTP user, which I do not have.
Do I really need this?

I changed the permissions to 755 and changed the owner of the file and the wp-content folder
For some reason it had not worked before, maybe cache.

Related

Unable to install wordpress plugins on google app engine

Even i changed file permissions to 777 of wp-content nothing happened, i am not able to install wordpress plugins...
You have to update the plugins on your local instance and then re-deploy to App Engine as mentioned on this document.
This is also explained other tutorials such as this one, the reason for this is basically that the directories for WP are read only by default on App Engine, and since it's a managed service, you don't really have much control on the folder permissions.
Hope you find this useful!

FTP permissions on Wordpress Bitnami AWS install?

I have setup a Wordpress site using Bitnami WordPress 4.8.1-0 on AWS (EC2).
I am now migrating a site from Bluehost to the AWS EC2 instance.
I am able to connect to the site via FTP and SSH. I uploaded my plugins and themes with my FTP client, no issues. The site is running with the theme and plugins from the old site. Great.
Now I am trying to upload the media files from /wp-content/uploads/2017/10on the old server but apparently I don't have permission to.
If I do a get-info on the plugins or themes folder, I see it's bitnami:daemon
but Uploads and all its subfolders are daemon:daemon, although it does look like I have write access:
I assume for security, but how can I upload all the media files? I'd hate to have to re-add them all via the admin UI.
You can try accessing via SSH and modify temporarily the permissions:
sudo chown bitnami:daemon -R /opt/bitnami/apps/wordpress/htdocs/wp-content/uploads
Then we advise you to restore the permissions.

wordpress asks for ftp password while installing plugins

I have a centos with user anamika with ftp loging.
I create wordpress folder loging with user anamika in webroot directory. User anamika has apache as primary group. The create folder gets user of anmika:apache when create.
When I try to install plugin it asks for ftp login.
When I changes user from anamika:apache to apache:anamika it works fine.
Please suggest a way to solve this user issue.
I checked following suggestion and wordpress blogs but didn't worked.
Wordpress plugins it asks for FTP Details
Wordpress asking for my FTP credentials to install plugins
Installing plugin for wordpress website hosted locally is asking for ftp details
If WordPress asking hostname and connection details for installing plugin and themes, we need to add a function hook in the wp-config.php file in the home directory.
define('FS_METHOD','direct');
You can use Paste the following code to your wp-config.php file,
preferably just below every other line of code to install plugin without ftp details...
define('FS_METHOD','direct');
The issue was with the permission of the user apache. I changed the user and group of the apache in httpd.conf file to the ftp user and it solved the issue.
Changed User apache Group apache to User anamika Group anamika

Fresh Wordpress install on Amazon Linux EC2...can't delete and reinstall

I just recently started by creating a EC2 instance on AWS. I used the Amazon Linux package. I changed the PHP settings to include the ability to upload files larger than 200MB. Got phpinfo.php working. Installed phpMyAdmin. Everything looked good.
Next, I installed Wordpress. It worked great. Then I tried installing a theme. Worked great. Then I started installing some plugins for that theme. Something made the site crash. I tried a few things, but since I couldn't go to the sites Wordpress Admin panel, it seemed hopeless. So I decided to start from scratch. I deleted the html directory (including wp-content) and dropped all the wordpress tables. I moved a fresh copy of Wordpress into the html directory, reconfigured the config.php file, and it recreated the Wordpress tables in the database. Seems to work great. When I try to upload a theme, it says:
Connection Information
To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.
I noticed that wp-content didn't have a uploads directory, so I created one. That seemed to let me upload the theme, but it showed up as a media file. I moved it to the theme directory and that worked. But when I tried to upload a plugin, I got the same message as a above.
What happened when I deleted everything? Or rather, where was information stored that when I reinstalled Wordpress, it didn't create a uploads directory? I am fine with reinstalling Wordpress from scratch, but I don't want to reinstall the whole LAMP stack or redo the AWS instance. Any thoughts?
The issue is that your web server doesn't have the proper permissions to write to your content directory.
The WordPress Codex has some good info for proper file and directory permissions. Ideally, all files should have 644 permissions, and all directories should be 755 (no higher).
If you're still running into issues adding plugins and updating WordPress, you should heed the advice of the following (so that you don't have to enter FTP details into WordPress each time):
Any file that needs write access from WordPress should be writable by the web server. If your hosting set up requires it, that may mean those files need to be group-owned by the user account used by the web server process.

Wordpress plugins it asks for FTP Details

While I am trying to upgrade the wordpress plugins it Asks for FTP Details.
I have added the following to wp-config.php
define('FTP_USER', 'username');
define('FTP_PASS', 'password');
define('FTP_HOST', 'host address');
It has worked fine.
But I have multiple websites working on my virtualmin server. All the wordpress site is having the same wordpress plugin issue. So is there any other fix that could resolve the Issue?
I just found these: link 1 and link 2, where I dug out this:
WordPress asks for your FTP credentials when it can't access the files directly. This is usually caused by PHP running as the apache user (mod_php or CGI) rather than the user that owns your WordPress files (suPHP or FastCGI). Switching over to using suPHP or FastCGI would probably fix it. Of course, if you don't want to mess with that, you can always just put your FTP credentials directly in wp-config.php or use this in the shell:
pae$ cd /var/ww
pae$ sudo chown -R www-data:www-data wordpress
The best way to deal with wordpress installation on apache is to use the secondary user and group to apache which would not cause these issue while updating or installing plugins and using other wordpress functions.
just change your apache config file User and Group to your username and group name
User [yourusername]
Group [yourgroupname]
In wp-config just write
define('FS_METHOD', 'direct');
Are you hosting your WordPress sites on one of those hosts where WordPress asks you to provide FTP details before upgrading itself or upgrading plugins?
So Now WordPress will stop asking you for FTP details Here’s how you can do it
Open your wp-config.php file locate in your wordpress root directory
And copy and past below detail after your database detail block in wp-config.php file
define(“FTP_HOST”, “ftp.yourhost.com”);
define(“FTP_USER”, “ftpusername”);
define(“FTP_PASS”, “ftppassword”);

Resources