WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
wp-config.php - incorrect modification (7 posts)

  1. Nic Windley
    Member
    Posted 2 years ago #

    WP super cache is adding the;

    define('WP_CACHE', true); //Added by WP-Cache Manager

    outside of the PHP block causing site errors every time I install it.

    Yes I can manually modify it, however it would be nice if it inserted it inside the block or after the first php start code <?php at least.

    Thanks!

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. admintiger
    Member
    Posted 2 years ago #

    That has not happened here. WP Super Cache inserted that line correctly in each of several installations.

  3. Nic Windley
    Member
    Posted 2 years ago #

    OK admintiger, well I've just done another 10 installs and all with the same result ?

    Any suggestions and what could be causing this ?

  4. admintiger
    Member
    Posted 2 years ago #

    I haven't looked at the code that writes that line in the wp-config.php file, but a non-standard wp-config.php file layout seems the most likely cause of the problem. Are there any lines above the <?php tag in that file. If so, move <?php to the beginning of the first line and see if that corrects the problem.

  5. admintiger
    Member
    Posted 2 years ago #

    Another thing to check is this line:

    /** The name of the database for WordPress */

    I don't know, because I haven't looked at the code, but I suspect the code searches for that line and then writes the following on the line below:

    define('WP_CACHE', true); //Added by WP-Cache Manager

    If the text of that line has been changed, the line won't be found and the software will be apt to write in a wrong place.

    The top of the wp-config.php should be like this to avoid potential problems:

    <?php
    /**
    * The base configurations of the WordPress.
    *
    * This file has the following configurations: MySQL settings, Table Prefix,
    * Secret Keys, WordPress Language, and ABSPATH. You can find more information
    * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
    * wp-config.php} Codex page. You can get the MySQL settings from your web host.
    *
    * This file is used by the wp-config.php creation script during the
    * installation. You don't have to use the web site, you can just copy this file
    * to "wp-config.php" and fill in the values.
    *
    * @package WordPress
    */

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */

  6. Nic Windley
    Member
    Posted 2 years ago #

    Strange...this is what I have, looks the same

    <?php
    /**
     * The base configurations of the WordPress.
     *
     * This file has the following configurations: MySQL settings, Table Prefix,
     * Secret Keys, WordPress Language, and ABSPATH. You can find more information
     * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
     * wp-config.php} Codex page. You can get the MySQL settings from your web host.
     *
     * This file is used by the wp-config.php creation script during the
     * installation. You don't have to use the web site, you can just copy this file
     * to "wp-config.php" and fill in the values.
     *
     * @package WordPress
     */
    
    // ** MySQL settings - You can get this info from your web host ** //
    
    /** The name of the database for WordPress */
  7. Nic Windley
    Member
    Posted 2 years ago #

    Thanks for your advice admintiger.

    I'll have to check to make sure as its possible that the master code I'm using as a site template got modified somehow when it got zipped or just before.

    If you think of anything else worth checking I'll look at that also.

    Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic