0

Parse error: syntax error, unexpected 'DB_HOST' (T_STRING), expecting ')' in /wp-config.php on line 36

I can't see where is the error. Its strange because the error has appeared all of a sudden.

Maybe is because I have installed a pirate plugin (Elementor Pro). But the error persists even with the plugging deactivated. What ca I do? I have a lot of work here :'(

<?php
    
    define('FS_METHOD', 'direct');
    define('FORCE_SSL_ADMIN', true);
    
    /**
     * 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', 'dbsXXXX' );
    
    /** MySQL database username */
    define( 'DB_USER', 'dbuXXXX' );
    
    /** MySQL database password */
    define( 'DB_PASSWORD', 'XXXXXX' );
    
    /** MySQL hostname */
    define( 'DB_HOST', 'XXXXXX.hosting-data.io' );
    
    /** 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',          '~7U0@}*GtT39ZeMFm VwPgZN557vqs->n:v@Oyr?u+sjQ+o.XyHxn:+Vt:2qol[b' );
    define( 'SECURE_AUTH_KEY',   'Ay$a8h);01ii-f<# ,jKPXG!&]/qZHs~W*vP1^P8va~sp=KK:ZAytV7C/WLd$z/w' );
    define( 'LOGGED_IN_KEY',     'S{G6o;uV{U?5#9Y}dJr&CVt?-=,ms2$KhwaS3m$e+[O#$<n6?Pr5KB4#+zWS|-z+' );
    define( 'NONCE_KEY',         'B@br,{c%y=xw:]mAg&R4|iu|Emlyvd/3/Q7fOa,W7})XEUw5af!>/G$#Q0>gryn.' );
    define( 'AUTH_SALT',         'HQJf:BB~UHT/1POtCQDW=-B+8_wJZvc6+V:Z+@e>Xvzy9[!<w>Put)+k+PybI(=b' );
    define( 'SECURE_AUTH_SALT',  'i@DsAQsNYSObfSW&.PxZY!Gce<UhTIP>R<OK~hUuKVwRdiv%_`R>,L/K#~pdgc[4' );
    define( 'LOGGED_IN_SALT',    ',!XBen(}_bAXie{$[Co&vjXS-_{=V_Q>x<!5t_,UDi_BC9^od#C*%m/Pnr,c-LIM' );
    define( 'NONCE_SALT',        'j.}1,l`>U1*jJ6ItT5)@H~Ob?9kRS}{0P)n&G-/j@t]^fZ7oW@GUSfM<APzw2x5t' );
    define( 'WP_CACHE_KEY_SALT', 'X3_t;iJ0((vXiae<9iR+;$Vbtee:hx4Gzc~>EGE-WNV~Q~(5o<t)d?M~qI~Rf0zj' );
    
    /**
     * 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 = 'UTpqxFch';
    
    
    
    
    /* That's all, stop editing! Happy publishing. */
    
    /** 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';
  • Have you changed your DB password recently? Perhaps to include a quotation mark? If yes, get rid, and change to something that doesn't. – Unbranded Manchester Feb 14 '21 at 18:35
  • 2
    Yup, @UnbrandedManchester is right - there is nothing wrong with the file. You must have `'` in your password. Change the password to letters and numbers only with no special characters. If you worry about security then change it to 128bit... – Fresz Feb 14 '21 at 22:20
  • Does this answer your question? [PHP parse/syntax errors; and how to solve them](https://stackoverflow.com/questions/18050071/php-parse-syntax-errors-and-how-to-solve-them) – Nico Haase Sep 25 '22 at 12:00

1 Answers1

-1

use ctrl + F then type "DB_HOST" or your string/variable

Jack
  • 1
  • Please add some explanation to your answer such that others can learn from it – Nico Haase Sep 25 '22 at 11:59
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 26 '22 at 01:33