• Hey guys

    I have a wordpress installed on my vps server. But wordpress cannot write to its directories.
    My server is using sftp, so I have to install a plugin sftp plugin to help update WordPress, themes and plugins. But to run any update, I have to select option, either ftp, ftps or sftp. Type in my username, password and then click proceed before any update, and installation of themes and plugins will take effect.
    For me to upload anything, I have to follow the process again. If I ran any settings that will write directly to the wordpress directory, the settings will not be effected, rather returns an error message.
    How will I enable wordpress to write and update seamlessly without requiring username, password and click to proceed?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello Agbams,

    What is the error message you are receiving?

    Have you set the correct folder permissions for your WordPress directory?

    Thread Starter UgoDimma

    (@lovecoinz)

    This one is not actually an error report, but an information because I have the details needed, and once I entered them, every update will be carried out.

    Connection Information
    To perform the requested action, WordPress needs to access your web server. Please enter your FTP or SSH credentials to proceed. If you do not remember your credentials, you should contact your web host.

    Here on W3 total cache I have an error report that says;

    W3 Total Cache: Default settings are in use. The configuration file could not be read or doesn’t exist. Please save the settings to create the file.

    The above error appears because WordPress was unable to create the file on itself.

    In addition to that, I enabled WordPRess debug as follows;

    // Enable WP_DEBUG mode
    define( 'WP_DEBUG', true );
    
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );
    
    // Disable display of errors and warnings
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );

    But WordPress was also unable to create the file debug.log

    Giving to the folder permission, I believe to have set the correct permission. My folders permission is drwxr-xr-r which is 755, and files permission is -rw-r–r–, which is 644

    What am I not doing right?

    Can you try putting your FTP details into your config.php with the following:

    define( 'FTP_USER', 'username' );
    define( 'FTP_PASS', 'password' );
    define( 'FTP_HOST', 'ftp.example.org:21' );

    This should get around the site asking for FTP whenever there is an update.(Source: https://codex.www.ads-software.com/Editing_wp-config.php#WordPress_Upgrade_Constants)

    Also, after entering your FTP details does it correctly update/add the plugins you’ve requested?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress can't write to its directories’ is closed to new replies.