Are you one of those people who finds themselves having to add their FTP details every time you want to update a plugin, theme or wordpress?
Some installs of wordpress don’t ask you for this information but some do, so how can this be?
WordPress is a PHP based software and the way you install it will determine whether you are prompted for the FTP details.
It’s all about permissions and who owns what
Once you have signed up for a hosting company the user name you choose will also be the user name Apache will run as (most of the time). Apache is your HTTP server software or simply put its like the waiter at a bar waiting to take orders, those orders in our case are requests for scripts, files, images etc.
When you install wordpress via an automated installer like quick install found on hostgator servers you will be installing and executing the install via Apache and thus wordpress will be given the correct permissions to modify files in your filemanager.
Sometimes though when you install wordpress manually via FTP the files can assume the identity of your ftp credentials instead of Apache and so when you try to update or modify a file via wordpress you have to log in via FTP.
Also this problem can arise when you transfer an account to another hosting provider or server. When you transfer a site via WHM which is the web host manager for VPS and Dedicated servers you copy the entire account from one server to another. The problem is that you also copy the user name which will be different to the one Apache assumes on your new server.
So how can we stop this?
Well the simplest answer is to install wordpress using the auto install options that most hosting providers have installed on their cpanel.
The other option which is simple enough is to add those FTP details to your wp-config found in the root of your server for that install of wordpress.
Simply open up wp-config and paste these 3 lines at the top of you wp-config file.
define( 'FTP_USER', 'username' ); define( 'FTP_PASS', 'password' ); define( 'FTP_HOST', 'ftp.sitename.com' );
You can find the details you need in cpanel by going to FTP accounts found under Files.
Open FTP Accounts and scroll down, look for your primary FTP user name and select configure on the right side and it will open up like this.
Copy your user name and ftp server name.
Your password should be the same as your Cpanel Log in.
Once you have added all the details you should now be able to update wordpress and make changes to your files right inside the wordpress admin panel.
Finally the last option is to just leave it alone, that’s assuming you like typing your password all day. I suppose on the upside some would consider it to be worthy typing practice.
I hope this is helpful to you and let me know if you have any issues.