In order to run, WPML requires the following:
- WordPress 4.7 or later
- PHP 5.6 or above with memory limit of at least 128MB while 256MB is recommended (see WP memory settings). Keep in mind that the required memory for your site depends on your content, theme, and all plugins.
- MySQL 5.6 or above. Alternatively, you can use MariaDB 10.1 or greater.
- That you can create tables in your database.
- WordPress REST API must be enabled for WPML to function properly.
- Multibyte String extension for using WPML String Translation
- SimpleXML extension for using XLIFF files in WPML Translation Management.
- The eval() PHP function must be enabled. More about this in the section about eval().
- The libxml PHP Module 2.7.8 or higher
Using earlier versions of PHP and MySQL
WPML may run on earlier versions of PHP and MySQL, but we cannot test that. If you are using earlier versions, we strongly recommend enabling WPML’s debug mode. This will surface any PHP errors and let you know if things do not run as they should.
Feel free to comment here about using WPML with other versions.
How to check which version of PHP you’re actually using
Some shared hosting companies have installed both PHP5 and PHP7. The best way to check which version you are actually using is to ask the PHP processor itself (not the technician in the hosting company).
Create a file called php_info.php and put it in your WordPress directory (just next to wp-config.php). This file should contain the following:
<?php phpinfo(); ?>
Not a big deal, right? If you need to, you are welcome to download it as a ZIP file. Grab php_info.zip (of course, you’ll need to unzip it before uploading to your server).
Once there, open a browser and go to https://yourdomain.com/php_info.php .
You should see something like this:
On top, it says which version of PHP you are running. If it says PHP Version 5.5, it will not work. The best thing to do is email your hosting company and ask them how to enable PHP 5.6, or greater.
Permalink structure
WPML adds language information to URLs. It has been tested with the following permalink structures:
- The default
- /%year%/%monthnum%/%postname%/
Explanation:
Other permalink structures may work too but can cause problems on different configurations. In all our sites, we are using /%year%/%monthnum%/%postname%/.
For pages, you will get the exact same URLs as with /%postname%/. However, with this permalink structure, there is no way WordPress will confuse between pages and posts, triggering potential problems for language resolution.
Usage of the eval() function
The eval() function must be enabled because WPML uses TWIG framework for its structure and templates, which makes WPML dependable on this function.
Most popular templating engines, such as Smarty and TWIG, have found that it is faster to write the PHP code to a file. In that way, it can take advantage of the OPcode caching and avoid to require a run-time building of template code.
TWIG runs a lot of checks and sanitation to avoid possible attacks and it is safe to be used with WPML. However, we cannot assure that other developers have made the same checks we did in our Quality Assurance process.
We are still investigating possible solutions which do not require compiling templates on the fly and would make the use of the eval() function unnecessary. However, at the moment, this is the best solution.
Please note that usually, the eval() function cannot be disabled in PHP, but some extensions such as Suhosin can do that. These extensions might be installed and configured by your hosting provider.