Upgrade WordPress with out prompting FTP login in Cpanel

Posted: 0p in Wordpress

In cpanel server WordPress upgrades will get you to permission issues most of the time. The easy solution is to configure wordpress with FTP login credentials. To get this done add following lines to wp-config.php file – assumed that WordPress installed under wordpress directory in public_html

define(‘FS_METHOD’, ‘ftpext’);
define(‘FTP_BASE’, ‘/public_html/wordpress/’);
define(‘FTP_CONTENT_DIR’, ‘/public_html/wordpress/wp-content/’);
define(‘FTP_PLUGIN_DIR ‘, ‘/public_html/wordpress/wp-content/plugins/’);
define(‘FTP_PUBKEY’, ‘/home/username/.ssh/id_rsa.pub’);
define(‘FTP_PRIKEY’, ‘/home/username/.ssh/id_rsa’);
define(‘FTP_USER’, ‘username’);
define(‘FTP_PASS’, ‘password’);
define(‘FTP_HOST’, ‘localhost’);
define(‘FTP_SSL’, false);

Where “username” is your cpanel account name and “password” is cpanel account password. Adding these lines will keep you away from prompting FTP username and password when you try upgrade.

*******************************************************************

Advertisements
Comments
  1. HCG diet says:

    Thanks for this great information! I really appreciate this. I actually let my husband have a look and he posted a link to it on his blog 🙂

  2. gokkasten says:

    bonjour i came to youre blog, and I have read some great posts on it. It’s all about the game gok-kasten let’s PLAY!!!

  3. Abdirizak says:

    Hi,
    Is it possible to update around 200 word press websites at one time using linux commands?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s