WordPress Warning: preg_replace(): JIT compilation failed: no more memory

I just have installed xampp with php 7.3.1 on mac with OS El capitan.

The problem that when i run a WordPress project will show:

Warning: preg_replace(): JIT compilation failed: no more memory in
/Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/formatting.php
on line 2110 Warning: preg_match(): JIT compilation failed: no more
memory in
/Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/functions.php
on line 4947 Warning: preg_replace(): JIT compilation failed: no more
memory in
/Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/functions.php
on line 4843 Warning: preg_match(): JIT compilation failed: no more
memory in
/Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/functions.php
on line 4947 Warning: preg_match(): JIT compilation failed: no more
memory in
/Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-includes/functions.php
on line 4947

2 s
2

I added the following line to the php.ini and restarted Apache and it worked (Xampp on macOS):

pcre.jit=0

This disables PCRE’s just-in-time compilation.

Further information:

  • http://php.net/manual/en/pcre.configuration.php#ini.pcre.jit

If you can’t find the location of php.ini and are using Xampp, go to localhost and select the PHP information link and it is displayed there.

Leave a Comment