How to Add or Change FTP Details for Easy WordPress Upgrades

If your WordPress site has recently been moved or if you have changed your FTP password, you may be continually prompted for your details within the dashboard. This can be quite annoying if you’re upgrading or installing new plugins and themes. Did you know that there’s a way to set these FTP details so that WordPress will never ask you again? It’s very easy and should save you a lot of time if you are struggling with with those auto-prompts.

How to Set Your WordPress FTP Details in wp-config.php

Step 1: Check Your FTP Username / Password.

You’ll want to make sure you’ve got the correct information before inputting it into wp-config.php. Visit your hosting control panel to verify your FTP hostname, username and password.

Step 2: Add the FTP Details to wp-config.php

You’ll want to specify the details for your connection and then add them in the wp-config.php file:

1
2
3
define('FTP_USER', 'username');
define('FTP_PASS', 'password');
define('FTP_HOST', 'ftp.example.org');

This should correct and update your FTP details with WordPress so that you can be on your merry way with upgrades and new plugin and theme installs. If you want to use a secure connection, you can add this:

1
define('FTP_SSL', true);

Sometimes you may experience issues because your WordPress installation is not in the root directory of the FTP server. In that case you’ll want to define the path to the base directory, content directory and the plugin directory:

1
2
3
define('FTP_BASE', '/path/to/wordpress/');
define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');

More than likely you won’t need to do all of the above. There are a number of WordPress Upgrade Constants listed in the codex, but you should only define as many of them as are necessary. There’s no need to go wild and put in all of them. Just the basic FTP details should be good enough to make your upgrades quick and easy.

Featured Plugin - WordPress Q&A Site Plugin

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - WordPress Pop-Up Chat Plugin

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

Featured Plugin - WordPress Infinite SEO Plugin

Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more

Featured Plugin - WordPress Newsletter Plugin

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Featured Plugin - WordPress Facebook Plugin

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

Featured Plugin - WordPress Google Maps Plugin

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Featured Plugin - WordPress Ecommerce Shopping Cart Plugin

Out of all the WordPress ecommerce plugins available, MarketPress has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

Featured Plugin - WordPress Membership Site Plugin

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

Featured Plugin - WordPress Appointments Plugin

Take, set and manage appointments and client bookings without having to leave WordPress. Appointments+ makes it easy.
Find out more
Tags

Comments (4)

  1. Sometimes it can be a permissions issue – depends on the error you’re getting. If you’re just getting the nagging prompt to enter FTP details every time, this should fix that. :)

  2. That might solve some users a real issue where they can’t (or don’t know how to) sort permissions.
    But if you do so you’d better move wp-config.php outside the web root… Well anyway should always be outside as exposing on top of DB details the FTP access is just free treats for hackers ;-)
    (in “details”: no wp-config in “www” or “public_html” but up this where it’s not accessible and WP does support one level up by default! For the ones having blog under a subdirectory like “/blog/” you can still do this and keep a wp-config.php that just make an include to the hidden file…)

    I think each suggestion on wp-config.php should be the occasion to remind such basic security to all ;-)

Participate