WP Domain Mapping Plugin

I'm in process of trying to learn how to use WP Multisite on chasdemo.com. I want to map another domain to that installation of WP and Multisite. I installed the domain mappimg plugin, and this is now showing up ... "Parse error: syntax error, unexpected 'if' (T_IF) in /home3/chasd2wm/public_html/wp-config.php on line 96" ... Question 1 is, where is it coming from, Question 2 is, how do I fix it, and last but not least, Question 3 is, what exactly are the best set-up options for the domain mapping plugin, for my own use of the system? After I get the system organized, up and running, I can explore the other options concerning allowing outsiders to use the system.

  • Ivan Shulev

    Hey Charles ,

    I hope you are having a nice day so far!

    "Parse error: syntax error, unexpected 'if' (T_IF) in /home3/chasd2wm/public_html/wp-config.php on line 96" ... Question 1 is, where is it coming from

    There is some custom code on line 96 in your wp-config.php that is not supposed to be there.

    Question 2 is, how do I fix it

    You will have to remove that code. If you are uncertain, you can send over FTP credentials and I can have a look.

    You can send that privately through our contact form: https://premium.wpmudev.org/contact/

    Select "I have a different question" for your topic.

    Send in:

    Subject: "Attn: Ivan Shulev"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    As an alternative, you can copy the contents of your wp-config.php file here and we will tell you what to remove exactly.

    NOTE** Please do NOT include any sensitive data like database name and password. Such information is found in your wp-config.php file so please change it when you paste here.

    Question 3 is, what exactly are the best set-up options for the domain mapping plugin, for my own use of the system

    You will have to specify what exactly you want to achieve with this plugin. I would recommend trying the default settings, but I am not certain what you want to do.

    I hope this helps and I wish you an awesome day ahead!


  • Charles

    Thanks for the prompt reply. Please note the attached file which is void of sensitive information as suggested. Please also note, that if I remove the 2 forward slashes at the beginning of ... //define('SUNRISE', 'on'); ... the parse error then returns. The following is what is showing in my Notepad++ editor at or on line 96: /** Absolute path to the WordPress directory. */
    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');
    however, that came with WP, so how can it be an error?
    In answer to Question 3 ... I'm trying to learn on my own how to set up my own sites in a multisite system, and then as I understand how the system functions a little more, and how to add to the system and subtract from the system without help, then tackle the part of adding outside persons to add sites to the system. I hope that makes some sort of sense.



    • Charles

      Well, it wouldn't attach the file, so here it is from a notepad file:

      * 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
      * obito 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', '');

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

      /** 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 {obito 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
      Security Key Goes 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!
      $table_prefix = '';

      * 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.
      * For information on other constants that can be used for debugging,
      * visit the Codex.
      * obito https://codex.wordpress.org/Debugging_in_WordPress
      define('WP_DEBUG', false);

      define( 'WP_ALLOW_MULTISITE', true );

      define('MULTISITE', true);
      define('SUBDOMAIN_INSTALL', true);
      define('DOMAIN_CURRENT_SITE', 'chasdemo.com');
      define('PATH_CURRENT_SITE', '/');
      define('SITE_ID_CURRENT_SITE', 1);
      define('BLOG_ID_CURRENT_SITE', 1);

      //define('SUNRISE', 'on'); ( NOTE: If I remove the two forward slashes in front of the line, this is when I get a parse error as I showed in the help request)
      /* 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');

      Thanks again,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.