Fatal error: Call to undefined function json_encode()

Hello everyone, I have no idea what to do and I really need help. My wordpress website works perfectly on localhost, but once i set it up on a real hosting i started getting this error:
`Fatal error: Uncaught Error: Call to undefined function json_encode() in /var/www/vhosts/mywebsite.com/httpdocs/wp-includes/functions.php:4247 Stack trace: #0 /var/www/vhosts/mywebsite.com/httpdocs/wp-includes/widgets/class-wp-widget-text.php(59): wp_json_encode(‘text’) #1 /var/www/vhosts/mywebsite.com/httpdocs/wp-includes/class-wp-widget.php(274): WP_Widget_Text->_register_one() #2 /var/www/vhosts/mywebsite.com/httpdocs/wp-includes/class-wp-widget-factory.php(102): WP_Widget->_register() #3 /var/www/vhosts/mywebsite.com/httpdocs/wp-includes/class-wp-hook.php(307): WP_Widget_Factory->_register_widgets(”) #4 /var/www/vhosts/mywebsite.com/httpdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(”, Array) #5 /var/www/vhosts/mywebsite.com/httpdocs/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #6 /var/www/vhosts/mywebsite.com/httpdocs/wp-includes/widgets.php(1854): do_action(‘widgets_init’) #7 /var/www/vhosts/mywebsite.com/httpdocs/wp-includes/class-wp-hook.php(307): wp_widgets_init(”) #8 /var/www/vhosts/mywebsite.com/httpd in /var/www/vhosts/mywebsite.com/httpdocs/wp-includes/functions.php on line 4247`

Does anybody have any idea what’s going on? What should i do?

1 Comment

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Your Advertisement Here