The below steps apply for PHP8:
1. Go to /etc/httpd/conf.modules.d
2. Edit 00-mpm.conf
3. Uncomment following line:
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
4. Comment both the following:
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
#LoadModule mpm_event_module modules/mod_mpm_event.so
5. Start Apache
service httpd start
Saturday, August 27, 2022
Fix "Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP. AH00013: Pre-configuration failed"
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.
Wednesday, August 24, 2022
View WordPress memory consumption
1. Install and Activate Server IP & Memory Usage Display
2. This will add a banner at the footer at WordPress App:
3. Optional - If needed to increase PHP or WP Memory limit.
PHP - Edit php.ini file and change the following line:
memory_limit = 256M
WordPress - Edit wp-config.php and add the following line:
define( 'WP_MEMORY_LIMIT', '200M' );
/* That's all, stop editing! Happy publishing. */