Title: Problem with config.php file
Last modified: August 19, 2016

---

# Problem with config.php file

 *  [Phil Gee](https://wordpress.org/support/users/phil-gee/)
 * (@phil-gee)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/problem-with-configphp-file/)
 * Parse error: syntax error, unexpected $end home/******/public_html/wp-config.
   php on line 2
 * I recently moved a client’s site to a new hosting provider because the previous
   provider did not support php version 5
 * This morning I was updating his plugins and received this message-
 * define(‘WP_CACHE’, true); //Added by WP-Cache Manager
 * at the top of my screen. Further messages suggested that I move this line of 
   code to a position above the following line of code
 * */require_once(ABSPATH . ‘wp-settings.php’);
 * When I downloaded the config.php file I saw that the intial line of code was 
   indeed above the second line anyway.
 * This is what the opening lines of the file look like
 * “
    define(‘WP_CACHE’, true); //Added by WP-Cache Manager <?php/** * The base 
   configurations of the WordPress. * * This file has the following configurations:
   MySQL settings, Table Prefix …”
 * Apart from the first line all the other code is on the same line. I now only 
   have the above error report when trying to view the client’s site- I only have
   access via ftp.
 * I’m not trained in using code so learn by trial and error and the goodwill of
   friends and people on these forums-
 * Please help me to rectify the issue with the config.php file,
 * thanks,
 * Phil

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/problem-with-configphp-file/#post-1950516)
 * that define line definitely needs to be moved down in the code…. it needs to 
   be at least under the first line, which has the opening <?php tag, anything added
   needs to be inside that tag
 * Any defines that I add to my wp-config file I always put just above the stop 
   editing/happy blogging line
 *  Thread Starter [Phil Gee](https://wordpress.org/support/users/phil-gee/)
 * (@phil-gee)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/problem-with-configphp-file/#post-1950522)
 * Thanks Rev. Voodoo, will try that
 *  Thread Starter [Phil Gee](https://wordpress.org/support/users/phil-gee/)
 * (@phil-gee)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/problem-with-configphp-file/#post-1950535)
 * Now receiving this error message
 * Fatal error: Call to undefined function wp() in /home/*******/public_html/wp-
   blog-header.php on line 14
 * Any clues?
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/problem-with-configphp-file/#post-1950549)
 * in the default, line 14 is within this:
 *     ```
       <?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
        */
       ```
   
 * which is all just commented out instructions….. what is different in yours?
 *  Thread Starter [Phil Gee](https://wordpress.org/support/users/phil-gee/)
 * (@phil-gee)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/problem-with-configphp-file/#post-1950568)
 * Just tried something else and now have a new error message
 * Parse error: syntax error, unexpected $end in /home/******/public_html/wp-config.
   php on line 1
 * which would appear to be <?php
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/problem-with-configphp-file/#post-1950576)
 * does it look exactly as above? That should be the exact first bit of your code….
 * You may wish to try downloading a fresh wp, and grabbing the wp-config sample
   out of it, and putting all your info into it, to see if you can rebuild, if you
   can’t figure out what’s going on…. or at least use it to compare…. I’m not sure
   what’s going on with your file
 *  Thread Starter [Phil Gee](https://wordpress.org/support/users/phil-gee/)
 * (@phil-gee)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/problem-with-configphp-file/#post-1950591)
 * Thanks once again Rev. Voodoo
 * I have sorted out the problem by reverting back to an old version of the site,
 * Cheers,
 * Phil
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/problem-with-configphp-file/#post-1950596)
 * Glad you got it sorted out!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Problem with config.php file’ is closed to new replies.

## Tags

 * [CONFIG.php](https://wordpress.org/support/topic-tag/config-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/problem-with-configphp-file/#post-1950596)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
