software and services

Install error: preg_replace(): Compilation failed: shortcodes.php on line 309

Hi friends, I’m back on WPError again. I’m here to share a new experience on example I’ve faced today. I was hired to move WordPress WooCommerce web-shop based on Bazar WordPress template from one to another domain. On the first sight project looks quite simple we could say “ABC” job but several issues appear.

I did successful SQL and FTP backup and restored both on the new server, did required SQL changes trough the PhpMyAdmin and tried to run the site. Then received this error for the first time in my six years of experience.

Install error: Warning: preg_replace(): Compilation failed: unknown option bit(s) set at offset 0 in /home/public_html/wp-includes/shortcodes.php on line 309

warrning shortcodes 309

Website is broken, revolution slider didn’t work (WordPress was unable recognize and call slider name), none of custom template shortcodes were working and there was many more smaller issues and errors.

At first I tried with various things with plugins and setting but at the end I realized it could be PHP error. So I decided to try with downgrading PHP from 5.4 to PHP 5.3 version. New server was on Godaddy witch under the Cpanel have an option for Software/Services – Select PHP version.

software and services

As soon as I switched PHP to older 5.3 version all site errors and issues are gone.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>