I’m receiving the below error when trying to access the Permalinks section on the WP admin. The page does not load and shows the error message instead. I cannot understand what this means or what has to be done. Any ideas are appreciated and thanks in advance.
Fatal error: Uncaught Error: Call to undefined function
apache_get_modules() in
/home/customer/www/mydomain.com/public_html/wp-includes/functions.php:5283
Stack trace: #0
/home/customer/www/mydomain.com/public_html/wp-admin/includes/misc.php(17):
apache_mod_loaded('mod_rewrite', true) #1
/home/customer/www/mydomain.com/public_html/wp-admin/includes/misc.php(46):
got_mod_rewrite() #2
/home/customer/www/mydomain.com/public_html/wp-admin/options-permalink.php(71):
got_url_rewrite() #3 {main} thrown in
/home/customer/www/mydomain.com/public_html/wp-includes/functions.php
on line 5283
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
The error is related with the Hosting Server PHP Version. So if you are on PHP 7.3.XX try downgrading to 7.2.xx or 7.1.xx and see if that helps!
P.S. I was facing the same issue and had to downgrade to PHP 7.1 to fix it!
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0