Sometimes you see the prompt below from WordPress requesting your FTP credentials while trying to install or update the rollback Rank Math.
This is because your website is configured to use a filesystem that prevents modifying files directly from your WordPress dashboard.
Here in the WordPress dashboard, plugins section. You can add your FTP credentials and click on Proceed.
WordPress will start the installation process. Again, you will get to see this window while you are updating the plugin.
The other option is if you don’t have FTP access, then you can use the direct method.
This article will show you how to change the FS_METHOD constant to remove this prompt window while installing/updating the Rank Math.
First, we’ll know what FS Method is.
What is FS_Method?
FS_METHOD is a WordPress constant specifying how WordPress should ideally write to the filesystem.
WordPress will try using the Direct method, which writes files directly to the filesystem.
This is one of the ideal methods and is highly efficient. However, if your server is not configured to allow direct file writes, WordPress will automatically try using the FTP method instead.
The FS_METHOD works by which type of method WordPress should use:
- direct
- ssh2
- ftpext
- ftpsocket
What does changing the FS_METHOD do to my server?
If you change the FS_METHOD, it will not have any negative impact on your server. However, if you change the constant to something different, you should enter FTP credentials for WordPress to function ideally.
Steps to Set the FS_METHOD:
Follow the steps given below to set the FS_METHOD.
Open wp-config.php File
First, open the wp-config.php file located at the root of your website. You can use the FTP or cPanel File Manager to access the file.
Add/Update FS_METHOD
In the wp-config.php file, check if the FS_METHOD is already defined. If the constant is not specified, you then have to include the code given below:
If the constant is already defined, you may update the FS_METHOD constant to direct, as shown below.
define( ‘FS_METHOD’, ‘direct’ );
Save/Upload the File
In the third step, save the file (for cPanel File Manager) or upload the file (for FTP) to reflect the changes on your website.
Note: If your access to the wp-config.php file is restricted, you should contact the web host to add the FS_METHOD.
So here you have it – a step-by-step guide on changing the FS_METHOD constant. This guide was helpful.