Skip Navigation

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

Problem:
After migrating your domain, you encountered issues with the WPML plugin that prevented access to the admin panel. The specific errors reported were related to the undefined function

simplexml_load_file()

and a fatal error from

ftp_nlist()

. Additionally, you inquired about changing the WPML license key post-migration.
Solution:
1. To address the

simplexml_load_file()

error, ensure that the SimpleXML extension is active on your server. This extension is necessary for the WPML translation editor. You may need to reinstall XML on your server, which your hosting provider can assist with. For more details, visit Stack Overflow and WPML Errata.
2. For the fatal error related to

ftp_nlist()

, add the following line to your

wp-config.php

file just before the 'That’s all, stop editing! Happy publishing.' line:

define('FS_METHOD', 'direct');

This change should help resolve the issue. Further information can be found in this support ticket: WPML Support Forum.

If these solutions do not resolve your issues or seem outdated, we recommend opening a new support ticket. Also, check related known issues at WPML Known Issues, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins.

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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Long Nguyen 10 months, 3 weeks ago.

Assisted by: Long Nguyen.

Author Posts
June 5, 2024 at 12:03 am #15704551

delyanD

Background of the issue:
I migrated the domain hidden link to a new one but don't really know how to change the license key due to the error that does not allow me to access the admin panel. I have the newest version of WordPress and all the plugins and had 0 issues with the whole operation process before the migration. If I deactivate the sitepress-multilingual-cms plugin on my new domain on the new server, I won't have any issues accessing the admin panel. If I have it activated, I can see my translations but not access the admin panel. I added the following to my config file: define('WP_MEMORY_LIMIT', '128M'); define('WP_MAX_MEMORY_LIMIT', '256M'); define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', true); @ini_set('display_errors',0);

Symptoms:
Fatal error: Uncaught Error: Call to undefined function simplexml_load_file() in /var/www/ctt/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/class-wp-installer.php:886

Questions:
How do I change the license key for WPML after migration?
How can I resolve the fatal error related to simplexml_load_file()?
Why does deactivating the sitepress-multilingual-cms plugin allow access to the admin panel?

June 5, 2024 at 2:40 am #15704675

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Thank you for contacting WPML support, I’m happy to help you with this issue.

Uncaught Error: Call to undefined function simplexml_load_file(), this function belongs to The SimpleXML extension, necessary for the WPML translation editor to work. It is not active on your server and forcing a re-install of XML should solve this.

https://stackoverflow.com/questions/49447168/call-to-undefined-function-simplexml-load-file
https://wpml.org/errata/php-7-possible-issues-simplexml/

This is something your hosting provider should know how to re-install.

I hope this answers your question.

June 12, 2024 at 1:05 pm #15731746

delyanD

So what we did was to change the server completely and use Ubuntu 24 instead of the previous one, and we got this error. Also use newer version of the PHP - hidden link

This is the error when the plugin is activated and it is on the whole website, not only on the admin. The URL is: ctt.uctm.edu

Deprecated: Creation of dynamic property Whip_RequirementsChecker::$configuration is deprecated in /var/www/ctt/wp-content/plugins/sitepress-multilingual-cms/vendor/yoast/whip/src/Whip_RequirementsChecker.php on line 37

Deprecated: Creation of dynamic property Whip_RequirementsChecker::$messageManager is deprecated in /var/www/ctt/wp-content/plugins/sitepress-multilingual-cms/vendor/yoast/whip/src/Whip_RequirementsChecker.php on line 38

Fatal error: Uncaught TypeError: ftp_nlist(): Argument #1 ($ftp) must be of type FTP\Connection, null given in /var/www/ctt/wp-admin/includes/class-wp-filesystem-ftpext.php:438 Stack trace: #0 /var/www/ctt/wp-admin/includes/class-wp-filesystem-ftpext.php(438): ftp_nlist() #1 /var/www/ctt/wp-content/plugins/wpml-wpforms/vendor/wpml/forms/classes/Translation/Config.php(52): WP_Filesystem_FTPext->exists() #2 /var/www/ctt/wp-content/plugins/wpml-wpforms/vendor/wpml/forms/classes/Forms.php(87): WPML\Forms\Translation\Config->getXmlArray() #3 /var/www/ctt/wp-includes/class-wp-hook.php(324): WPML\Forms->init() #4 /var/www/ctt/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #5 /var/www/ctt/wp-includes/plugin.php(517): WP_Hook->do_action() #6 /var/www/ctt/wp-settings.php(695): do_action() #7 /var/www/ctt/wp-config.php(91): require_once('...') #8 /var/www/ctt/wp-load.php(50): require_once('...') #9 /var/www/ctt/wp-blog-header.php(13): require_once('...') #10 /var/www/ctt/index.php(17): require('...') #11 {main} thrown in /var/www/ctt/wp-admin/includes/class-wp-filesystem-ftpext.php on line 438

Valeri

June 13, 2024 at 1:24 am #15733790

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I see there is a fatal error that breaks your site

Fatal error: Uncaught TypeError: ftp_nlist(): Argument #1 ($ftp) must be of type FTP\Connection, null given in /var/www/ctt/wp-admin/includes/class-wp-filesystem-ftpext.php:438

Please try to add the code below to the file wp-config.php right before the /* That’s all, stop editing! Happy publishing. */ line:

define('FS_METHOD', 'direct');

and let me know how it goes.

Refer to this ticket https://wpml.org/forums/topic/problem-activing-wpml-string-translation/

Looking forward to your reply.
Thanks

June 13, 2024 at 10:46 am #15735619

delyanD

Thank you