· Tutorial ·

Adding FTP data in WordPress

Updates to plugins or the WordPress core itself require access data to the FTP server. Normally they will be requested every time, but we can choose to include them in the WordPress configuration files so that they will not be requested again.

Here is how to include the FTP data in the configuration file:

  • Access the directory where you have hosted WordPress (usually: "/data/web/").

  • Modify the file "wp-config.php".

info You may choose to access via FTP to modify the file. If you have doubts about how to access, see our manual Manage FTP accounts

  • Add the following lines:
define('FTP_USER', 'User_Name');
define('FTP_PASS', 'Password');
define('FTP_HOST', 'FTP_Server_IP');
define('FS_METHOD', 'direct');
  • Modify the following parameters:

    • Username: FTP access user.
    • Password**: FTP access password.
    • FTP-Server-IP**: FTP server address or IP.

As an example:

define('FTP_USER', 'swdemo');
define('FTP_PASS', 'SwC0ntras3ña!');
define('FTP_HOST', '');
define('FS_METHOD', 'direct');

Remember that in case you need to download or update any component, WordPress will need write permissions on the "wp-content" directory.

To do this, from SWPanel go to Services > Select the service where WordPress is installed > Manage permissions and click on the icon of the "wp-content" directory:

If the icon is green, it means that you have write permissions.

We have now configured the FTP data in WordPress!