Skip to main content
WordPress supports multiple filesystem access methods for installing and updating plugins and themes. MainWP requires the “direct” method to function properly on child sites.

What You’ll Learn

  • Why FS_METHOD matters for MainWP
  • How to configure the setting
  • How to troubleshoot file permission issues

Why This Setting Matters

WordPress can access the filesystem through several methods:
MethodDescription
directPHP directly reads and writes files
ssh2Uses SSH connection for file operations
ftpextUses PHP’s FTP extension
ftpsocketsUses FTP via sockets
MainWP needs direct filesystem access to perform updates, install plugins/themes, and manage files efficiently. When WordPress uses FTP or SSH methods, MainWP operations may timeout or fail.

When You Need This Setting

Apply this setting if you experience:
  • MainWP Dashboard warnings about filesystem method
  • Plugin or theme updates failing with permission errors
  • Upload operations timing out
  • “Could not create directory” errors during installations

How to Apply the Setting

1

Connect to your Child Site

Use FTP, SFTP, or your hosting file manager to access the site files.
2

Open wp-config.php

Locate and open the wp-config.php file in the site root directory.
3

Add the FS_METHOD constant

Add this line before the comment /* That's all, stop editing! */:
define( 'FS_METHOD', 'direct' );
4

Save and test

Save the file and test by running an update from your MainWP Dashboard.

File Permissions

For direct filesystem access to work, WordPress needs proper file permissions:
ItemRecommended Permission
Directories755
Files644
wp-config.php640 or 600
If you’ve set FS_METHOD to direct but still encounter issues, check that your hosting account owns the files and directories.

Alternative: FTP Configuration

Some managed hosts don’t allow direct filesystem access. In those cases, configure FTP credentials instead:
define( 'FTP_USER', 'your-ftp-username' );
define( 'FTP_PASS', 'your-ftp-password' );
define( 'FTP_HOST', 'ftp.yoursite.com' );
See the WordPress documentation on filesystem constants for complete options.

Troubleshooting

If setting FS_METHOD doesn’t resolve issues:
  1. Verify file ownership matches your PHP process user
  2. Check if your host restricts certain PHP functions
  3. Review the Required PHP Functions list
  4. Contact your hosting support for assistance with file permissions

Self-Check Checklist

  • FS_METHOD constant added to wp-config.php
  • File saved successfully
  • Test update runs without errors
  • File permissions set correctly (755/644)