Challenges of Updating WordPress Without FTP Access
If you’re using a web host that requires FTP login access before updating WordPress or plugins, you may run into some difficulties.
Unfortunately, some clients may not have access to their FTP login credentials, making it difficult for them to update their website. This guide will cover how to edit your wp-config.php file for WordPress FTP setup, along with some other words of advice.
The example below illustrates my experience of installing the Akismet plugin on a website hosted on a Windows hosting account.
One of the major challenges with this setup is that it requires the input of FTP credentials in order to update plugins. Other challenges include:
- This can be a significant obstacle for clients who do not have access to their FTP login information.
- This can cause confusion and often results in clients giving up on the update process altogether.
- This can then put the website at great risk of becoming compromised over time as a result of not updating the plugins.
How to set up FTP credentials within the wp-config.php file
Instead of using an outdated plugin like FTP Access to automate the entry of FTP login information, we recommend adding FTP credentials directly to the wp-config.php file. See the file list example below:
Luckily the WordPress.org developers have included an option within WordPress to remedy this problem.
All you need is access to your web hosting company’s File Manager or FTP access in order to view and edit the wp-config.php file.
This file can be found in the top directory of your hosting account, just above the /wp-content directory.
Once you’ve opened or “Edit“ed your wp-config.php file, just add the lines below above the line:
/* That’s all, stop editing! Happy blogging. */
Here is an example of the FTP-related text you will copy into your wp-config.php file.
Copy/paste the code below, just above the “That’s all, stop…” line:
define('FTP_USER', 'example'); define('FTP_PASS', '*******'); define('FTP_HOST', 'example.com:21'); define('FTP_SSL', false);
/* That's all, stop editing! Happy blogging. */
- Be sure to replace the items shown in green with your web hosting account’s FTP settings respectively.
Quick summary. To remove the “Installing Plugin: Akismet” popup example shown above, all I did was add my FTP credentials into my wp-config.php file, Save the file, refresh the plugins page, and then add the Akismet plugin once again.
And no more manual entry of my password in the future. Cool huh!
More information regarding editing wp-config.php may be found at https://codex.wordpress.org/Editing_wp-config.php
This guide shows you how to set up FTP credentials in WordPress using the wp-config.php file, a best practice for website administrators and developers using WordPress to secure the website from potential threats and keep it up to date.