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.
Nginx, Wordpress - cant upload media & install plugins (from within wordpress!)
Nginx, Wordpress - cant upload media & install plugins (from within wordpress!)
Tried stackoverflow, used a couple of hours on this and yet - i dont know what is wrong. So i come here, as a humble man, hoping somebody help me with this.
I can't figure out why I can't create folders or upload new media files on my WordPress installation via the website. I can when logged in with the FTP create, delete and edit files no problems - but i cant do it from wordpress itself!
When i try to upload a new plugin, it asks for FTP access, and if i provide it - it works fine (this is not a suitable solution).
1. CentOS
2. nginx
3. VestaCP
4. WordPress (up-to-date)
5. php/php-fpm (up-to-date)
I've tried everything I can think of, and I'm still unable to do anything.
1. Permission is 755 (more than enough for WP, and works if i set it to 777 - no shit)
2. i have triple checked that the user:group is correct
3. `write_enable=YES` @ `vstcp.conf`
4. I tried `define('FS_METHOD', 'direct')` @ `wp-config.php` - but this only removes wordpress asking for FTP information. And when trying to upload, i just get "Can't create plugin folder"
5. Folder permissions is test123:test123
6. PHP-FPM running as user test123 (confirmed both in linux
I can't figure out why I can't create folders or upload new media files on my WordPress installation via the website. I can when logged in with the FTP create, delete and edit files no problems - but i cant do it from wordpress itself!
When i try to upload a new plugin, it asks for FTP access, and if i provide it - it works fine (this is not a suitable solution).
1. CentOS
2. nginx
3. VestaCP
4. WordPress (up-to-date)
5. php/php-fpm (up-to-date)
I've tried everything I can think of, and I'm still unable to do anything.
1. Permission is 755 (more than enough for WP, and works if i set it to 777 - no shit)
2. i have triple checked that the user:group is correct
3. `write_enable=YES` @ `vstcp.conf`
4. I tried `define('FS_METHOD', 'direct')` @ `wp-config.php` - but this only removes wordpress asking for FTP information. And when trying to upload, i just get "Can't create plugin folder"
5. Folder permissions is test123:test123
6. PHP-FPM running as user test123 (confirmed both in linux
Re: Nginx, Wordpress - cant upload media & install plugins (from within wordpress!)
cd /home/admin/web/domain.com/public_html
chown -R admin:admin *
it oki for me.
chown -R admin:admin *
it oki for me.
Last edited by skurudo on Wed Apr 12, 2017 12:13 pm, edited 1 time in total.
Reason: adv link removed
Reason: adv link removed
-
- Posts: 43
- Joined: Tue Apr 18, 2017 7:55 am
Re: Nginx, Wordpress - cant upload media & install plugins (from within wordpress!)
What user is the webserver running as and what user is wordpress running as? You need to carefully configure your server so that it conforms to Wordpress specifications. These are what are most likely going to work with Wordpress (obviously).Svendbent wrote:
2. i have triple checked that the user:group is correct
5. Folder permissions is test123:test123
6. PHP-FPM running as user test123 (confirmed both in linux
https://codex.wordpress.org/Changing_File_Permissions (Scroll down to the section titled "Permission Scheme for WordPress")
1. First and foremost...
" if you utilize mod_rewrite Permalinks or other .htaccess features you should make sure that WordPress can also write to your /.htaccess file."
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)
2. Many hosts simply decide that security risks associated with providing a suitable level of access as outlined above is not worth it and force users to use their ftp user instead...
If WordPress is running as the FTP account, that account needs to have write access
3. Also, this may be of use too (although not directly your problem i dont think)
https://codex.wordpress.org/Hardening_WordPress