The wp-config.php
file is a core file on every WordPress installation. It serves as a configuration file for authentication, database, and server settings. To modify wp‑config.php
, you must access the underlying file system of your WordPress installation. This guide directs you to three different ways.
⚠️ Backup your site now
Always backup your site before modifying wp-config.php
. If you don’t backup your site, at least make a copy of wp-config.php
before modifying it. This way you can quickly restore your site in case of an error.
1️⃣ Use your host’s online file manager
Some online hosting companies provide a web-based file manager that allows you to browse and edit your WordPress installation files. This is the recommended approach because it does not require any plugins or special credentials. Unfortunately, not all hosts provide this option. Sign into your hosting account and look for a file browser.
2️⃣ Use a file manager plugin
If your hosting service does not have an online file browser, you can install a plugin that does the same. WP File Manager is the most popular plugin in the file browser category, and the free version is sufficient to edit wp-config.php.
3️⃣ Use SSH File Transfer Protocol (SFTP)
Another option is to use SFTP (SSH File Transfer Protocol). SFTP is a secure protocol for interacting with a remote file system. Many WordPress hosting companies offer SFTP as a way to connect to the file system. One advantage of SFTP is that it works even if WordPress itself is down. One disadvantage is that you must install an SFTP client for your operating system. FileZilla is a popular client.
Reference
- Editing wp-config.php – Advanced Administration Handbook | Developer.WordPress.org – Developer information about the settings defined in wp-config.php
Leave a Reply