I installed a Wordpress blog in my local system.But when I try to add plugins from admin it asks for FTP access. What do I need to configure for Wordpress to be able to upload without FTP?
相关问题
- Display product ACF field value in Woocommerce tra
- Adding a custom button after add to cart button in
- How to add a “active” class to a carousel first el
- Setting custom order statuses as valid for payment
- change the font size in tag cloud
相关文章
- wordpress新增页面如何个性化设置
- select query in wordpress
- Get WooCommerce featured products in a WP_Query
- Woocommerce update shipping methods in checkout vi
- Getting the list of files over FTP
- Change order status just after payment in WooComme
- PHP 7 FTP extension is not loaded in Windows 7
- Unit/Integration testing FTP access
I changed the ownership of the wordpress folder to www-data recursively and restarted apache.
It worked like a charm!
As mentioned by Niels, this happens because the server process user can't write to the Wordpress folder.
But here's the thing a lot of articles don't explain. It's the owner of the php process, not the nginx process. If you try to change the nginx owner, it won't solve this.
To solve it, try running
ps aux
to see which user owns the php-fpm process. Then check that user is the same user as the owner of the wordpress folder, or can at least write to it. If the user can't write to it, you'll need to change permissions and/or ownership of the folder; or put the two users (server owner and wordpress folder owner) in a common group which can write to the folder; or change php.ini "user" property to a user that can write to the folder.First move to your installation folder (for example)
Now we’re going to modify your htdocs directory:
Enter your root password when prompted, then finish it out with a chmod call:
I did a local install of WordPress on Ubuntu 14.04 following the steps outlined here and simply running:
solved my issue with downloading plugins. The only reason I'm leaving this post here is because when I googled my issue, this was one of the first results and it led me to the solution to my problem.
Hope this one helps to anyone!
Try to add the code in wp-config.php:
On OSX, I used the following, and it worked:
_www is the user that PHP runs under on the Mac.
(You may also need to chmod some folders too. I had done that first and it didn't fix it. It wasn't until I did the chown command that it worked, so I'm not sure if it was the chown command alone, or a combination of chmod and chown.)