WordPress asking for my FTP credentials to install plugins

后端 未结 14 823
南旧
南旧 2020-11-30 17:52

I installed a WordPress blog in my local system. But when I try to add plugins from admin it asks for FTP access. What do I need to configure for WordPress to be able to up

14条回答
  •  一向
    一向 (楼主)
    2020-11-30 18:24

    If during installation of a plugin, Wordpress asks for your hostname or FTP details. Then follow these steps:

    Login to your server and navigate to /var/www/html/wordpress/. Open wp-config.php and add this line after define(‘DB_COLLATE’)

    define('FS_METHOD', 'direct');
    

    If you get "Could not create directory" error. Give write permissions to your wordpress directory in recursive as

    chmod -R go+w wordpress
    

    NOTE. For security, revoke these permissions once you install a plugin as

    chmod -R go-w wordpress
    

提交回复
热议问题