Prevent WordPress installing plugins and themes via Admin

When I initially set up WP, I had entered my FTP details in the Admin so that I could add plugins and themes directly from Admin. However, I believe this compromises the website as I have found malware in the plugins and themes folders on many occasions.

Please can someone advise me on how I can revoke WPs FTP access? I don’t want WP to be in control of adding plugins and themes and would rather do this via my FTP client.

Read More

Cheers

Related posts

Leave a Reply

1 comment

  1. You can simply delete the lines from your wp-config.php.

    define('FTP_HOST', 'yourhost.com');
    define('FTP_USER', 'youruser');
    define('FTP_PASS', 'yourpass');
    

    However, this does not automatically mean that you are secure. There are a lot of backdoors where malware could be injected, starting from the server, security-issues in your plugins, outdated software etc.

    Please be sure to check for all the latest versions.

    Also, if you have set your file permissions to FTP-only, you will not be able to upload media or update plugins/WordPress if you do not change them.