WPML rewrites are not working

Heya. I am developing locally and try to finda why use multilanguage. First installed WPMU to read that the rewrites are not supported. Okay, moved back to use WPML and the rewrites dont work on that plugin the same.


The urls to other plugins are okay - like expected: plugins/my-plugin.js. Any advices are welcome. Thx in advance.

I’ve never used multilanguage, but if rewrites are causing issues, just disable it in lib/config.php in the theme.

Are the other WPML JS file paths working with the rewrites? If so, it might be related to wp_localize_script but I’m not sure. Rewrites have been removed from Roots core since we’ve been recommending to use Composer to manage WP. With Composer you already have cleaner URLs (/app/themes/themename/, /app/plugins/)

Thanks for the hints. I turned on other plugins from WPML they all have the same issues. So no rewrites of these WPML plugins. I will check out the article and hope I find a solution.

@botta I created a composer skeleton WordPress repository. There is a roots example in there also. Hope this can help.

Note: There is a mu-plugins file called wp-setup in there that needs some edit if you do not us windows, but helps put your setup in line with the structure.

Did you manage to get this working?

I have an urgent need for a multilingual site and I’m hoping to use roots to build it.

Related to this thread, I noticed that roots is no longer listed in the WPML compatible themes list:

Does this mean that Roots is no longer compatible with WPML?

I am planning to give Composer a whirl - will that help?

I really hope it’s possible to get this working again. I’m not into the idea of using another theme, I’m spoiled by the awesomeness that is roots.

It is compatible. Either disable the nice-search option in lib/config.php or see Github for a proposed fix and don’t use the Roots Rewrites plugin (composer should be fine).

Great news.

Thank you for the fast and helpful reply.

That’s it then. Full steam ahead for my first Composer managed, Grunt compiled, Capistrano deployed, internationalised, responsive Wordpress site.

I will most certainly post on here when done.

I know you chaps do this stuff for the greater good but believe me, it is very much appreciated. If this works out, I will have to find a way to buy you all a pint.


Is Roots still compatible with WPML?

I haven’t used it on any sites within the last 6 months, but it should still be fine. Have you tried?

I just try and everything works as expected. I only had problems with the archive dates, but is solved by creating a date.php from index.php