This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem:
I am trying to activate WPML but it gives error:

Fatal error: Cannot redeclare icl_get_home_url() (previously declared in /home/dynamicw/rentacar.dynamicwebsites.gr/wp-content/plugins/polylang/modules/wpml/wpml-legacy-api.php:18) in /home/dynamicw/rentacar.dynamicwebsites.gr/wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php on line 73

Solution:
It seems that you are trying to activate WPML while Polylang is also activated, this is generating the error. Please deactivate Polylang plugin and then install WPML plugin.

Relevant Documentation:
We have another client who had the similar issue and was also able to solve it, this may help in your case:
https://wpml.org/forums/topic/error-when-activating-wpml-multilingual-cms-2/#post-1491095

Here is step by step guide to Activate and register the site with WPML:
https://wpml.org/faq/install-wpml/

This topic contains 2 replies, has 2 voices.

Last updated by aegeanR 6 months, 1 week ago.

Assigned support staff: Noman.

Author Posts
April 14, 2019 at 10:46 am #3607423

aegeanR

I am trying to:activate wpml

Link to a page where the issue can be seen:

I expected to see:

Instead, I got:
Fatal error: Cannot redeclare icl_get_home_url() (previously declared in /home/dynamicw/rentacar.dynamicwebsites.gr/wp-content/plugins/polylang/modules/wpml/wpml-legacy-api.php:18) in /home/dynamicw/rentacar.dynamicwebsites.gr/wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php on line 73

April 14, 2019 at 11:21 am #3607613

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. It seems that you are trying to activate WPML while Polylang is also activated, this is generating this error. Please deactivate Polylang plugin and then install WPML plugin.

We have another client who had the similar issue and was also able to solve it, this may help in your case:
https://wpml.org/forums/topic/error-when-activating-wpml-multilingual-cms-2/#post-1491095

Here is step by step guide to Activate and register the site with WPML:
https://wpml.org/faq/install-wpml/

I hope it helps, Thank you

April 15, 2019 at 7:18 pm #3615937

aegeanR

My issue is resolved now. Thank you!