How to Edit wp-config.php File

In WordPress, the wp-config.php file is critical to performance of the website.

It contains database connection information where all content is stored. Plus, it has base configuration details that affect performance of the entire website.

We offer managed WordPress hosting designed for non-technical users. That’s why we’ve taken a different approach to editing this file.

To offer best WordPress performance out of the box, we don’t allow direct editing of wp-config.php file. If you look at the file, you’ll notice it doesn’t have much. You won’t be able to edit it (no write permission).

/**
 * Do not edit this file. Edit the custom-config.php file found in the root dir instead.
 * This file is required in the root directory so WordPress can find it.
 * Contact support team if you need help at support@projectarmy.net
 */

require_once(dirname( __FILE__ ) . '/../private/config.php');
require_once(dirname( __FILE__ ) . '/custom-config.php');
require_once(ABSPATH . 'wp-settings.php');

The original wp-config.php references 2 new files:

custom-config.php
config.php

Make Your Edits Inside custom-config.php

In the root directory of your WordPress (same place as wp-config.php) you will find a file custom-config.php.

This is the file you should use to make changes to wp-config.php.

For example, this is where you would enable WP_DEBUG :

define( 'WP_DEBUG', true );

Read-Only Settings Inside config.php

This is where all the critical details are. We’ve placed this file in a separate directory, outside public access. So no one can access contents of this file from a browser by mistake.

Plus, we’ve hard-coded certain settings to give you the best performance possible. They offer fair resource usage, enough for the plan you have paid for.

Below, you’ll see a list of settings (constants) that you can’t change:

define('WP_MEMORY_LIMIT', '96M');
define('DISABLE_NAG_NOTICES', true);
define('FORCE_SSL_ADMIN', true);
define('DISALLOW_FILE_EDIT', true);
define('WP_AUTO_UPDATE_CORE', false);
define('WP_POST_REVISIONS', 15);
define('EMPTY_TRASH_DAYS', 30);
define('AUTOSAVE_INTERVAL', 300);
define('DISABLE_WP_CRON', true);
define('FS_METHOD', 'direct');
define('CORE_UPGRADE_SKIP_NEW_BUNDLED', true);

If you think you need one of these changed, contact support team. Explain why you need it changed and we will review your request. We can’t guarantee we will approve it, but it won’t hurt to ask.

Yes, this can be very restrictive to some users. But our managed hosting is designed for non-technical users. Less is more, in this case. You get amazing performance with fewer responsibilities.
If you need full control over your WordPress, we’re not the right hosting provider for you. There are plenty of alternative providers that will give you full control. Don’t forget, if you decide to switch to another hosting provider we will migrate your website to their hosting for free. No hard feelings. Your success is our top priority.

Was this article helpful?

Still need help? Yes, I do!