Prevent removal of line breaks from wp-config.php upon save settings

[ad_1]

First, thanks for this great plugin.

When Powered Cache settings are saved (specifically page cache enabled or disabled), the wp-config.php file is updated where you add

define( 'WP_CACHE', true ); // Powered Cache

to the top of the file. But all line breaks are removed from the file as well.

For instance, this:

define('DB_CHARSET', 'utf8');

define('DB_COLLATE', '');

Becomes this:

define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

It doesn’t break anything, but the file is now harder to read.

I’m using nginx, WordPress 6.4.1, Powered Cache 3.3.1, PHP 8.1, on an a localhost test environment.

Thanks.

  • This topic was modified 17 hours, 23 minutes ago by jumbo.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer