simple way of fixing wordpress asking for ftp credentials

3
A Simple Way of Fixing Wordpress Asking for FTP Credentials From time to time, you may need to install, modify or delete your Wordpress themes with the motive of enhancing the appearance or performance of your Wordpress based website. While doing these updates, you may be sometimes asked for providing FTP details within the dashboard. This can be quite annoying especially when you are performing some changes within your website. Do you know there are ways for to set these FTP details so that Wordpress will never ask you again. The ways are simple to understand and provide an instant way of fixing those auto-prompts. However, if you find them confusing or don't possess enough knowledge of diagnosing them, you can take the help of best Wordpress plugin development company , and thus give a staggering boost to your website performance. But before we take you to the topic directly, let's understand first the reasons causing the Wordpress ask for FTP details. Wordpress core makes changes to the file system whenever any user performs automatic updates or installation within the admin dashboard. Before finalizing any changes, it first checks whether the permission entered are correct or not. If any deviations are found, it will first ask you enter your FTP account information as it contains all the correct permissions to update the files on your website and Wordpress can continue doing its operations using the FTP user. What You Can Do to Fix When Wordpress Ask You Fill FTP Credentials One of the easiest ways of fixing this is add the following FTP information to your wp-config.php file. define('FS_METHOD', 'direct'); define('FTP_BASE', '/usr/home/username/public_html/my-

Upload: amy-brown

Post on 15-Jul-2015

178 views

Category:

Technology


1 download

TRANSCRIPT

A Simple Way of Fixing Wordpress Asking for FTPCredentials

From time to time, you may need to install, modify or delete your Wordpress themes with themotive of enhancing the appearance or performance of your Wordpress based website. While doingthese updates, you may be sometimes asked for providing FTP details within the dashboard. Thiscan be quite annoying especially when you are performing some changes within your website.

Do you know there are ways for to set these FTP details so that Wordpress will never ask you again.The ways are simple to understand and provide an instant way of fixing those auto-prompts.However, if you find them confusing or don't possess enough knowledge of diagnosing them, youcan take the help of best Wordpress plugin development company , and thus give a staggering boostto your website performance.

But before we take you to the topic directly, let's understand first the reasons causing the Wordpressask for FTP details.

Wordpress core makes changes to the file system whenever any user performs automatic updates orinstallation within the admin dashboard. Before finalizing any changes, it first checks whether thepermission entered are correct or not.

If any deviations are found, it will first ask you enter your FTP account information as it containsall the correct permissions to update the files on your website and Wordpress can continue doing itsoperations using the FTP user.

What You Can Do to Fix When Wordpress Ask You Fill FTP Credentials

One of the easiest ways of fixing this is add the following FTP information to your wp-config.php file.

define('FS_METHOD', 'direct');

define('FTP_BASE', '/usr/home/username/public_html/my-

wedsite.example.com/wordpress/');

define('FTP_CONTENT_DIR', '/usr/home/username/public_html/my-website.example.com/wordpress/wp-content/');

define('FTP_PLUGIN_DIR ', '/usr/home/username/public_html/my-site.example.com/wordpress/wp-content/plugins/');

// define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub');

// define('FTP_PRIKEY', '/home/username/.ssh/id_rsa');

define('FTP_USER', 'my-ftp-username');

define('FTP_PASS', 'my-ftp-password');

define('FTP_HOST', 'ftp.my-site.example.com');

// define('FTP_SSL', false);

After adding this code, you need to get the permission to control your server.

There are two scenarios for going about it: Either you have the privileges of altering the FTPsettings or you run your website on 99.9% shared hosting. In the case of shared hosting, there is adifferent technique but if the former is the case with you, you need to find out the owner of the webserver.

Finding the Web Server Ownership

After going through the search process, you'll observe that it's the owner of the PHP process whohas the ownership, and not the web server.

So, we will run ps aux I grep php, to check which owner owns the PHP process.

$ ps aux | grep php

root 1249 0.0 0.1 290648 5956 ? Ss Oct1 0:10 php-fpm: master

process (/etc/php/php-fpm.conf) webowner 1278 0.0 1.0 374340 39492 ? S Oct 1 0:20 php-fpm: pool www webowner 1279 0.0 1.1 374808 41460 ? S Oct 1 0:15 php-fpm: pool www webowner 3934 0.0 1.0 374852 38048 ? S Oct 1 0:14 php-fpm: pool www

This tells you that it's that the web server is running under the user 'webowner'.

You can now give that user recursive ownership by adding the following command.

$ sudo chown -hR webowner:webowner PATH_TO_YOUR_WORDPRESS_FOLDER

And you are done!

Hopefully, you find this article useful in fixing the problem of Wordpress asking for FTPcredentials.

If you are looking forward to hire best WordPress expert then just get in touch with WordPrax Ltd.and you can follow us on facebook and twitter.