Friday, August 26, 2022

Fix "XMLReader Support Missing" WordPress error - AWS Linux 2 instance



When trying to import a site plugin, you could get the following error:

You're close to importing the template. To complete the process, please clear the following conditions.

    XMLReader Support Missing


To fix it, please follow the next steps:

1. Make sure the installed php version is 8.0:
php -v
PHP 8.0.20 (cli) (built: Jun 23 2022 20:34:07) ( NTS )


If not, follow the steps described here to upgrade to PHP 8.0:
https://www.cyberciti.biz/faq/install-php-7-2-7-3-7-4-0r-8-0-on-amazon-linux-2/

2. Install xml support:
yum install php-xml

3. Enable all xml modules:
php -i --enable-xml
php -i --enable-xmlreader
php -i --enable-xmlwriter

4. Check modules are installed:
php -m

5. Restart php
service php-fpm restart

6. Restart httpd
service httpd restart

All set.

No comments:

Post a Comment