New Wordpress Installation Showing Error Message

by Dele
14 replies
  • WEB DESIGN
  • |
Hi warriors,

I had completed a new wordpress installation on my server and tried to restore my files etc from my old blog but no data/information apart from the initial 1 post and 1 comment was showing on the new blog.

I then accessed the wp-confiq.php to update these variables

Data base name
Data Base User
Data Base Password

which i did and my site is now showing this error message.

Parse error: syntax error, unexpected $end in ...wp-config.php on line 1
Kindly advise on what i have to do to rectify the situation, even at least to restore it first of all to the initial position of not showing my restored posts.
#error #installation #message #showing #wordpress
  • Profile picture of the author reboot38
    Chances are, when you edited the wp-config file, you left a blank line at the beginning.

    Make sure that wp-config.php starts with:

    Code:
    <?php
    That "should" fix the problem...if not, let me know and we'll take a closer look.
    {{ DiscussionBoard.errors[3846473].message }}
  • Profile picture of the author Istvan Horvath
    Originally Posted by Dele View Post

    I had completed a new wordpress installation on my server and tried to restore my files etc from my old blog but no data/information apart from the initial 1 post and 1 comment was showing on the new blog.
    That already sounds scary... If you did what you said above - that's wrong.
    If you wanted to move a blog to a new location (it seems so) that's NOT the correct way to do it.
    You may have to erase everything and re-start the process. Let me know if you need help AND - most importantly - clarify what you were trying to do!

    Originally Posted by Dele View Post

    I then accessed the wp-confiq.php to update these variables

    Data base name
    Data Base User
    Data Base Password

    which i did and my site is now showing this error message.
    I don't know what "accessing" means... normally, you should download (via FTP) and edit that file in a plain text editor like Notepad; then upload again.

    The error message is quite clear: you have some garbage code in line #1 in the wp-config.php file. Check what did you mess up while editing.
    Signature

    {{ DiscussionBoard.errors[3846500].message }}
    • Profile picture of the author jamesg3
      Look Down at the very bottom of the wp-cofig file. You will probably notice a blank line. Backspace that line out and try to load Wp in your browser again. You do not have junk code in there. You just can not have that blank line. Each time you open that file with something other than a text editor you are subject to have that blank line added and must check to be sure its gone.
      Signature
      Serious Wordpress sites, html/css sites and flash sites Cheap. I provide killer SEO, easy to use e-commerce solutions and payment gateways. Check me out at Serious Website Design.
      Need Hosting with serious speed and power? 3.99 a month. Take a look here. Serious Website Hosting.
      {{ DiscussionBoard.errors[3846516].message }}
  • Profile picture of the author Dele
    Thank you guys for your input.

    I have checked for any blank spaces but cannot find any.

    I have also downloaded wp-confiq-sample.php to notepad editor and slotted in the security details and uploaded back to server as wp-confiq.php, with no different result.

    Here is the wp-confiq.php file, with security details deleted, in case i am missing something

    <?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 Editing wp-config.php « WordPress Codex 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 */define('DB_NAME', '');/** MySQL database username */define('DB_USER', '');/** MySQL database password */define('DB_PASSWORD', '');/** MySQL hostname */define('DB_HOST', 'localhost');/** Database Charset to use in creating database tables. */define('DB_CHARSET', 'utf8');/** The Database Collate type. Don't change this if in doubt. */define('DB_COLLATE', '');/**#@+ * Authentication Unique Keys and Salts. * * Change these to different unique phrases! * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. * * @since 2.6.0 */define('AUTH_KEY', 'put your unique phrase here');define('SECURE_AUTH_KEY', 'put your unique phrase here');define('LOGGED_IN_KEY', 'put your unique phrase here');define('NONCE_KEY', 'put your unique phrase here');define('AUTH_SALT', 'put your unique phrase here');define('SECURE_AUTH_SALT', 'put your unique phrase here');define('LOGGED_IN_SALT', 'put your unique phrase here');define('NONCE_SALT', 'put your unique phrase here');/**#@-*//** * WordPress Database Table prefix. * * You can have multiple installations in one database if you give each a unique * prefix. Only numbers, letters, and underscores please! */ = 'wp_';/** * WordPress Localized Language, defaults to English. * * Change this to localize WordPress. A corresponding MO file for the chosen * language must be installed to wp-content/languages. For example, install * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German * language support. */define('WPLANG', '');/** * For developers: WordPress debugging mode. * * Change this to true to enable the display of notices during development. * It is strongly recommended that plugin and theme developers use WP_DEBUG * in their development environments. */define('WP_DEBUG', false);/* That's all, stop editing! Happy blogging. *//** Absolute path to the WordPress directory. */if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/');/** Sets up WordPress vars and included files. */require_once(ABSPATH . 'wp-settings.php');
    Signature

    What Others Are Saying About This Top MLM Company | Get Brand New, Brand Name Products For Pennies @ New Penny Auctions | Play Online Game At Eager Zebra Games | The source through which i smile to the Bank daily with $$$ => Top Home Based Businesses

    {{ DiscussionBoard.errors[3846942].message }}
    • Profile picture of the author jamesg3
      The edn error comes from this below. It halppens because the proper close to that tag is in fact on another file. You can not break the action here. It has to go from code to code or page to page. Meaning no blank space at the end of the file. Also, Your file is truncated, (all squished together) you have the original right? I hope you made a copy, lol. Anyways, the last line here
      Code:
      */require_once(ABSPATH . 'wp-settings.php');
      Can not have any line or blank space below it at all. If you scroll down is that last
      Code:
      php');
      sitting on the very, very bottom of the page with absolutely no - not even one line of space below it? I mean at all? If there is one blank line, your dead in the water. so go to that last line and to the end of the code and hit delete about 50 times. then save. Also, I would try the original file again, this one is garbled now. I will include a screenshot to show you
      Signature
      Serious Wordpress sites, html/css sites and flash sites Cheap. I provide killer SEO, easy to use e-commerce solutions and payment gateways. Check me out at Serious Website Design.
      Need Hosting with serious speed and power? 3.99 a month. Take a look here. Serious Website Hosting.
      {{ DiscussionBoard.errors[3846987].message }}
      • Profile picture of the author jamesg3


        This is bad as it breaks the connection to the next set of instructions on the next file and causes the "end" error on line 1 to happen. Also, you need that file to be un-squished up like that. Get the original file and try again and don't let it get truncated like that, lol
        Signature
        Serious Wordpress sites, html/css sites and flash sites Cheap. I provide killer SEO, easy to use e-commerce solutions and payment gateways. Check me out at Serious Website Design.
        Need Hosting with serious speed and power? 3.99 a month. Take a look here. Serious Website Hosting.
        {{ DiscussionBoard.errors[3847026].message }}
  • Profile picture of the author Dele
    Thanks jamesg3,

    Yes, there is absolutely no line below that end point

    Code:
    php');
    Not even a single space after that point, even on the same line.

    Probably the file is squished because i copied from the notepad editor to which i downloaded the original. The original is still on the server.
    Signature

    What Others Are Saying About This Top MLM Company | Get Brand New, Brand Name Products For Pennies @ New Penny Auctions | Play Online Game At Eager Zebra Games | The source through which i smile to the Bank daily with $$$ => Top Home Based Businesses

    {{ DiscussionBoard.errors[3847049].message }}
    • Profile picture of the author jamesg3
      Here is the best advice for you at this time. If you follow or have followed these instructions you will be fine. Look here Moving WordPress « WordPress Codex. If you have any issues, let me know I will help you move it all from scratch. I don't want to get caught up in trying to fix something, but i will move it (the fresh working version) from server to server for you for free.
      Signature
      Serious Wordpress sites, html/css sites and flash sites Cheap. I provide killer SEO, easy to use e-commerce solutions and payment gateways. Check me out at Serious Website Design.
      Need Hosting with serious speed and power? 3.99 a month. Take a look here. Serious Website Hosting.
      {{ DiscussionBoard.errors[3847076].message }}
      • Profile picture of the author jamesg3
        Also, how do you have your ftp set up? Using auto, ascii, or bianary? These things make a huge difference.....
        Signature
        Serious Wordpress sites, html/css sites and flash sites Cheap. I provide killer SEO, easy to use e-commerce solutions and payment gateways. Check me out at Serious Website Design.
        Need Hosting with serious speed and power? 3.99 a month. Take a look here. Serious Website Hosting.
        {{ DiscussionBoard.errors[3847083].message }}
  • Profile picture of the author Dele
    Perhaps this is looking better.

    I removed the formatting to word wrap
    Code:
    <?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 Editing wp-config.php « WordPress Codex 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 */define('DB_NAME', '');/** MySQL database username */define('DB_USER', '');/** MySQL database password */define('DB_PASSWORD', '');/** MySQL hostname */define('DB_HOST', 'localhost');/** Database Charset to use in creating database tables. */define('DB_CHARSET', 'utf8');/** The Database Collate type. Don't change this if in doubt. */define('DB_COLLATE', '');/**#@+ * Authentication Unique Keys and Salts. * * Change these to different unique phrases! * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. * * @since 2.6.0 */define('AUTH_KEY',         'put your unique phrase here');define('SECURE_AUTH_KEY',  'put your unique phrase here');define('LOGGED_IN_KEY',    'put your unique phrase here');define('NONCE_KEY',        'put your unique phrase here');define('AUTH_SALT',        'put your unique phrase here');define('SECURE_AUTH_SALT', 'put your unique phrase here');define('LOGGED_IN_SALT',   'put your unique phrase here');define('NONCE_SALT',       'put your unique phrase here');/**#@-*//** * WordPress Database Table prefix. * * You can have multiple installations in one database if you give each a unique * prefix. Only numbers, letters, and underscores please! */  = 'wp_';/** * WordPress Localized Language, defaults to English. * * Change this to localize WordPress. A corresponding MO file for the chosen * language must be installed to wp-content/languages. For example, install * de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German * language support. */define('WPLANG', '');/** * For developers: WordPress debugging mode. * * Change this to true to enable the display of notices during development. * It is strongly recommended that plugin and theme developers use WP_DEBUG * in their development environments. */define('WP_DEBUG', false);/* That's all, stop editing! Happy blogging. *//** Absolute path to the WordPress directory. */if ( !defined('ABSPATH') )    define('ABSPATH', dirname(__FILE__) . '/');/** Sets up WordPress vars and included files. */require_once(ABSPATH . 'wp-settings.php');
    Signature

    What Others Are Saying About This Top MLM Company | Get Brand New, Brand Name Products For Pennies @ New Penny Auctions | Play Online Game At Eager Zebra Games | The source through which i smile to the Bank daily with $$$ => Top Home Based Businesses

    {{ DiscussionBoard.errors[3847125].message }}
  • Profile picture of the author Dele
    Thanks so much for the offer jamesg3.

    I have contacted hostgator (my web host) and they have now started to help me look into it.

    Will post the details of their findings here later.

    I am so grateful.
    Signature

    What Others Are Saying About This Top MLM Company | Get Brand New, Brand Name Products For Pennies @ New Penny Auctions | Play Online Game At Eager Zebra Games | The source through which i smile to the Bank daily with $$$ => Top Home Based Businesses

    {{ DiscussionBoard.errors[3847199].message }}
    • Profile picture of the author jamesg3
      Ok, no worries. Did you check the link in my last post? It is the direct link to the page to show you exactly how to move Wp from one place to another.
      Signature
      Serious Wordpress sites, html/css sites and flash sites Cheap. I provide killer SEO, easy to use e-commerce solutions and payment gateways. Check me out at Serious Website Design.
      Need Hosting with serious speed and power? 3.99 a month. Take a look here. Serious Website Hosting.
      {{ DiscussionBoard.errors[3847247].message }}
      • Profile picture of the author Dele
        Originally Posted by jamesg3 View Post

        Ok, no worries. Did you check the link in my last post? It is the direct link to the page to show you exactly how to move Wp from one place to another.
        Yes, thanks. Actually i had seen that link before and actually used it as a guide to move my wordpress blog.

        It was in the process of just trying to adjust the wp-confiq.php for my security details in view of the old blog posts not showing up on the new wordpress site, that this error problem cropped up.
        Signature

        What Others Are Saying About This Top MLM Company | Get Brand New, Brand Name Products For Pennies @ New Penny Auctions | Play Online Game At Eager Zebra Games | The source through which i smile to the Bank daily with $$$ => Top Home Based Businesses

        {{ DiscussionBoard.errors[3847652].message }}
  • Profile picture of the author xtrapunch
    If you want to move your blog from one URL to the other, you require to make the chenges in Settings->General. Then use "Find and Replace" plugin to replace the old url in the blog with new one. Of course, you need to direct your new domain to the server hosting the blog/website.

    If you are moving from one server to other from one domain to another, make a fresh install on the new server. In the old website, go to Tools->Export and create a XML file. Now, import this in your new website. All posts/pages and files will be added. again, use Find Replace plugin.

    Can't be simpler. I guess you need to start afresh.
    Signature
    >> Web Design, Wordpress & SEO - XtraPunch.com <<
    Web Design & SEO Agency | Serving World Wide from New Delhi, India

    {{ DiscussionBoard.errors[3847715].message }}

Trending Topics