Skip to main content
Share Your Experience: Take the 2024 Developer Survey
179 votes

to perform the requested action wordpress needs to access your web server. please enter your ftp

Add the following to wp-config.php: define( 'FS_METHOD', 'direct' ); Let me know how it works for you.
Narendra Solanki's user avatar
32 votes

to perform the requested action wordpress needs to access your web server. please enter your ftp

This means that WordPress is having limited permission for making changes in the folder that it was installed. In-order to fix this, all that you need to do is provide necessary permissions for the ...
Syamraj K's user avatar
  • 329
26 votes

Setting $_SERVER['HTTPS']='on' prevents access to wp-admin

Special thanks to user42826. According to the codex: If WordPress is hosted behind a reverse proxy that provides SSL, but is hosted itself without SSL, these options will initially send any requests ...
nu everest's user avatar
18 votes

ftp_nlist() and ftp_pwd() warnings

After all, it was already in the question! Context Both plugins are related to my WordPress site theme (uplift). I can't understand what it is doing or where, but when it detects that the owner of ...
NBajanca's user avatar
  • 341
17 votes

Media not actually deleted on disk when click "Permanent Delete"

So, after several attempts... it is a problem (or a feature) of the WPML multilanguage plugin. To start with, I have set up correctly the user permissions, as @WebElaine mentioned. Just in case ...
mmystery's user avatar
  • 331
10 votes

to perform the requested action wordpress needs to access your web server. please enter your ftp

Even though it is totally correct to have the ownership as root:apache with permissions 775, and httpd to run as apache, Wordpress does not like this. It wants the owner to be apache, as per wp-admin/...
w00t's user avatar
  • 201
10 votes

Wordpress REST API - Permission Callbacks

The issue was because I wasn't generating and sending a nonce value with the request. In order to generate a nonce value. Localize the value of a wp_create_nonce('wp_rest') function call. ...
connorb's user avatar
  • 193
9 votes

Wordpress monthly upload directory owner set to root

I've had the same problem, and in my case it was the Wordpress cronjob. I was calling the wp-cron.php as a root cron job, and this script also generates the monthly upload folder. If you call wp-cron....
Marco's user avatar
  • 106
7 votes

Remove admin bar for subscribers

To hide admin bar from non admin users, add the following code to you functions.php file // show admin bar only for admins if (!current_user_can('manage_options')) { add_filter('show_admin_bar', '...
Deepak's user avatar
  • 71
7 votes

WordPress Update - This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php

I solved this by making the webserver user the owner and the group of all the files in the WordPress directory. I figured out the webserver user was daemon with: ps aux | egrep '(apache|httpd)' Then ...
Mike P. Sinn's user avatar
6 votes

WP in Docker - cannot install plugin or upgrade WP

The problem, as the error description indicates, is permissions. Based on that tutorial, nginx is running under the www-data user, but WP folders are owned by deployer. If you change the ownership ...
gdbj's user avatar
  • 176
5 votes

How to prevent a post from being deleted?

This is an old post, but for others still seeking an answer, I think there's a more elegant way – filtering user_has_cap. This allows you to remove the users rights to delete a post under whatever ...
Mark Barnes's user avatar
5 votes

Moving Media Library

There are three ways you could do this: 1. Upload all into the Media Library The most tiresome way, IMHO, is to upload all the images you got via the media library. 2. Use a plugin You can use ...
RRikesh's user avatar
  • 5,635
5 votes

What permissions does wp-content/uploads need?

You'll want directories to have 755 and files to have 644. you can navigate to your www directory and use these 2 commands: find . -type d -print0 | xargs -0 chmod 0755 # For directories or find . -...
rudtek's user avatar
  • 6,121
5 votes

No user found when using REST API

This is happening because you are not using nonces. Because you have not provided a nonce with the request, Wordpress is treating you as if you are an unauthorized/non-logged in user. This is because ...
Hybrid Web Dev's user avatar
4 votes

Can I create users that have access to *some* other users posts instead of all other users posts?

Here's my approach. Bear in mind that it covers the basic needs you've described but could be easily expanded into more robust solution. Few steps to follow (all code goes to your functions.php): 1. ...
Levi Dulstein's user avatar
4 votes

Wordpress roles - Protect administrator role

It's a bit different in WP than in Drupal. First, the admin role is specifically designed to be the role that can do everything. Rather than try to restrict the admin role, it's best practice to ...
WebElaine's user avatar
  • 9,430
4 votes

Correct wp-content ownership and permissions

By default, all files added by the Apache itself will be owned by the server's user, in your case www-data. But since your users use FTP to deploy, those files are owned by them, and it makes the ...
djboris's user avatar
  • 758
4 votes

Hardening WordPress - how to set .htaccess permissions?

It might be useful to let the web server write .htaccess during initial site setup, e.g. when you're setting up rewrite rules (as it said) or if you're setting up a multisite network. Once you've done ...
Rup's user avatar
  • 4,277
3 votes

Allow contributors to create page (but not publish)

How would you go about this? I see this is an old question and that you found a solution with an existing plugin. However, since this is a development StackExchange, it's probably better if there's ...
Nathan Johnson's user avatar
3 votes

MySQL Database User: Which Privileges are needed?

Regarding the "Note" in redburn's post, the Wordpress Codex also has a Warning you should also read about updates and database schema changes... (Edit: I notice however that I DO NOT SEE "GRANT" in ...
Jerry-L's user avatar
  • 51
3 votes

WordPress missing user roles on local dev machine. Live site works fine

Just in case anyone else has this issue: I had two sites with a custom table prefix. This prefix is also used for some rows in the options table. When moving the options table from one site to ...
Ewout's user avatar
  • 2,641
3 votes

Update post counts (published, draft, unattached) in admin interface

I know this is an old post, but I have run across it several times looking for a better solution, so I figured I'd add a little something to the mix. Until today, I have been parsing out each ...
Mort 1305's user avatar
  • 963
3 votes

Add menu page issues (permissions & position)

With add_menu_page then you can use position with add_submenu_page then you can use priority of add_action( 'admin_menu', '...', $priority) add_action('admin_menu', 'function_to_create_menu_page'); ...
huypham's user avatar
  • 161
3 votes

What permissions does wp-content/uploads need?

You can find a full list of recommended file and folder permissions on the codex at: See the section entitled "Using the Command Line" for chmod ...
Anson W Han's user avatar
3 votes

How to check if a role has a specific capability

#Update: Wow, I feel like such a buffoon... haha. WP_Role::has_cap I can't (role) my eyes hard enough. $caps = array( 'cap_1', 'cap_2', 'cap_3' ); $roles = array( 'administrator', 'editor' ); ...
Xhynk's user avatar
  • 870
3 votes

Safe to set permissions to 757 temporarily to update via wp-cli?

I think setting a cron job to automatically turn permissions on and off might be a bit of an extreme workround :-) I think it is probably worth spending the time to set up working permissions on your ...
junkrig's user avatar
  • 448
3 votes

403 Forbidden - You don't have permission to access /wp-admin/admin-ajax.php on this server

This sounds like it's probably caused by mod-evasive (or similar) plugin in Apache (or similar), blocking multiple consecutive requests as it thinks you are trying to run a denial of service (DOS) ...
Ned Martin's user avatar
3 votes

How create a role with admin capability less 1 or 2?

It sounds like you want to add all the admin capabilities to a role except a few key capabilities that you have in mind. What you could do is get the administrator role and do a key diff on ...
Howdy_McGee's user avatar
  • 20.7k
2 votes

Destination directory for file streaming does not exist or is not writable

there are already Define Temp code in my wp-config.php file i just remove it and it work for me.
Aadii Mughal's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible