Home » Documentation » Developers Information » Debugging WPML

Debugging WPML

As of version 0.9.8 WPML includes a debugging module that is disabled by default and can be activaetd by adding a line of code to the wp-config.php file.

The wp-config.php is one of the WP/WPMU core files and can be found in the WP/WPMU root folder. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it.

Normally, your wp-config.php file looks like this:

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

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

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

/** MySQL hostname */
define('DB_HOST', 'localhost');
...

The line of code you need to add is:

define('ICL_DEBUG_MODE', true);

A good place to put it is right before this line:

/* That's all, stop editing! Happy blogging. */

but you can place it anywhere else as long it’s before:

require_once(ABSPATH . 'wp-settings.php');

Once you added the code, if there’s an error caused by the plugin (or caused by anything else) which would normally not show because of the default error reporting settings on your server, you should see it at the top of the screen like in these images below:

Debugging WPML (1)

Debugging WPML (1)

Debugging WPML (2)

Debugging WPML (2)

You just need to copy the error message you’re seeing there and send it to us. (Especially if it’s obviously related to WPML).

Once you’re done with the debugging, don’t forget to remove the code you had to add to wp-config.php. (Or you can comment it out or set the constant value to false).

How to send us bug reports

Our technical support forum is the best place for sending bug reports. WPML developers are monitoring every post and respond quickly. You can subscribe to get email notifications about comments in your thread to get our replies when they’re available.