Knowledge Base
MilesWeb / How-Tos, WordPress FAQ

Know How To Set Constant FS_Method?

Approx. read time : 3 min

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.

installing plugin

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:

  1. direct
  2. ssh2
  3. ftpext
  4. 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.

Nehal is an ardent content writer. She's passionate about crafting content that's simple but adds value. Her insatiable interest in writing has allowed her to explore her skills. She is adept and can write for different types of content formats.

Trusted By Thousands of Clients & Big Businesses

We highly appreciate the kind and stellar feedback we receive from our customers. Delivering the best is our goal! MilesWeb is rated Excellent out of 5 based on reviews. Read more reviews.

Excellent
Based on reviews
2 hours ago
Perfect and Valuable Server + ...
I am using MilesWeb Servers, The main thing which I getting are continuous support over everything w...
Gunjan Makwana
4 hours ago
Milesweb is superb Hosting pro...
Milesweb is superb Hosting provider ever, their Support team is amazing!!!...
Abhishek Singh
15 hours ago
Great support in great timing...
We need urgent assistance on changes in a primary domain on our client's Cpanel accounts and reached...
Riyaju Deen
21 hours ago
Best Website Hosting platform ...
I was new on MilesWeb. And needed help on multiple areas from setting up to getting started with cre...
Harshada
1 days ago
Very quick and helpful assista...
Very quick and helpful assistance. Support person listened properly and provided a nice solution....
Narendra
1 days ago
the team is very supportive th...
the team is very supportive though at times effort needs to be made to make understand the problem s...
Suree Sharma
1 days ago
I am using miles web for 3plus...
I am using miles web for 3plus years, very quick and perfect support by the team, they helped me man...
Sri Raghav
2 days ago
The service is good...
The service is good. They are answering with patience and doing the needful as soon as possible....
MR
2 days ago
Perfect and Valuable Server + ...
I am using MilesWeb Servers, The main thing which I getting are continuous support over everything w...
Gunjan Makwana
3 days ago
Very quick and helpful assista...
Very quick and helpful assistance. Support person listened properly and provided a nice solution....
Narendra
4 days ago
positively helped me with find...
positively helped me with finding insecure content on my website causing SSL to not work properly on...
Thaviraj Junglee
4 days ago
Exceptional support, Truly Pra...
I had opted for the basic wordpress hosting plan as I intended to experiment with various plug-ins. ...
Aseem Chandna