-1

I have build a lot of wordpress sites and never have seen this error, I just have finished the website and moved it to the final hosting and I'm having this error:

Parse error: syntax error, unexpected 'WP_DEBUG' (T_STRING) on line 74

The content is:

<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://codex.wordpress.org/Editing_wp-config.php
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'XXXXXXXXX' );

/** MySQL database username */
define( 'DB_USER', 'XXXXXXXXXX' );

/** MySQL database password */
define( 'DB_PASSWORD', 'XXXXXXXXXX' );

/** MySQL hostname */
define( 'DB_HOST', 'XXXXXXXXXXXXX' );

/** 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',         'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'SECURE_AUTH_KEY',  'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'LOGGED_IN_KEY',    'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'NONCE_KEY',        'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'AUTH_SALT',        'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'SECURE_AUTH_SALT', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'LOGGED_IN_SALT',   'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );
define( 'NONCE_SALT',       'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' );

/**#@-*/
/**
 * 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!
 */
$table_prefix = 'xxxxx_’;

/**
 * Para desarrolladores: modo debug de WordPress.
 *
 * Cambia esto a true para activar la muestra de avisos durante el desarrollo.
 * Se recomienda encarecidamente a los desarrolladores de temas y plugins que usen WP_DEBUG
 * en sus entornos de desarrollo.
 */
define('WP_DEBUG', true);

/* ¡Eso es todo, deja de editar! Feliz blogging */

/** WordPress 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');

Someone see what is missing here or where is the error? Thanks to all!

Brave DMA
  • 7
  • 3
  • Did you put the semicolon in the line before the comment? – benny-ben Sep 13 '18 at 15:53
  • very interesting links: [PHP parse/syntax errors](https://stackoverflow.com/q/18050071/9219404) > [Unexpected T_STRING](https://stackoverflow.com/a/18092277/9219404) – benny-ben Sep 13 '18 at 15:58
  • 1
    Check the code highlighting in your question above, you can clearly see that PHP code is wrongfuly colored just after your `tableprefix`. Just use a good [tag:ide] and you'll be able to spot this things while writing the code. – brasofilo Sep 13 '18 at 17:59
  • 1
    Your closing quote character is wrong on `$table_prefix = 'xxxxx_';` – disinfor Sep 13 '18 at 19:22

2 Answers2

1

please take a closer look where you define your table prefix. The semicolons are different one from another. In wp-config.php file sometimes this happens and it throws an error. Check out the screenshot: enter image description here

0

If I create a simple PHP file (with a syntax error):

<?php
$table_prefix = 'wp_

define('WP_DEBUG', false);

And try to execute it, I get the following error:

PHP Parse error:  syntax error, unexpected 'WP_DEBUG' (T_STRING) in simple.php on line 4

So you have an unterminated string assignment somewhere in the file before the call to define().

Sean Bright
  • 118,630
  • 17
  • 138
  • 146