Solve “to perform the requested operation, WordPress needs access to your web server”

For example, when we create a WordPress site in the VPS host, we need to install themes, plugins, etc. online, but when we click download and install, we will have “to perform the requested operation, WordPress needs to access your web server.”. Please enter your FTP login credentials to continue. If you forget your login credentials (such as user name and password), please contact your website hosting provider. “Error prompt. It seems that our VPS does not give enough permission to the site.

How to solve it? For example, we has this problem in building a site in llsmp one click package. How to solve it?

First, authorized directory

chown -R www-data /home/wwwroot/ wpfans.org/html
chmod -R 775 /home/wwwroot/ wpfans.org/html
chmod -R 777 /home/wwwroot/ wpfans.org/html/wp -content/

Replace the red part with the directory of your site

Second, modify WP- config.php Documents

define(“FS_ METHOD”, “direct”);
define(“FS_ CHMOD_ DIR”, 0777);
define(“FS_ CHMOD_ FILE”, 0777);

In WP- config.php Add the above three lines at the end of the file.

In this way, we can download plugins and install themes in the background of WordPress.

Related Article
WordPress displays the registration time of the login user in the frontend

When using WordPress to build a website, some users want to display the user registration time in the frontend, but Read more

WordPress adds the number of SQL queries at the bottom

An excellent woodpress theme is definitely that the less SQL consulting is used, the better. How can we see how Read more

Some WordPress articles can be seen after comments / replies

If we want to hide part of the content of the article and need the user's comments and replies to Read more

WordPress common template function reference document

Basic template filefile namedescribe style.css Theme style file index.php Home page template file header.php Header template file single.php Single article Read more

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image