Working with Demo Templates

I was trying out different demos to use and wanted to possibly use the extended demo, “App” but when I try to install, the web page gets stuck loading it. The loader bar first says initializing and then says Working on it… but the page never reloads. All other demos that i’ve tried have loaded quickly without any issues. I have created a few pages but don’t think that could be causing the issue. Do you have any ideas how to get the App demo loaded?

FYI:
I let this page continue to load, after about a half hour I received an email from my server company saying that I’m reaching my CPU usage limits. I checked my limits and said it was at a 91%. When I stopped the page that was loading the app demo it went to 33% system disk usage.

Thank You

Hi Bryce,

Thanks for writing in! You can start over by resetting your WordPress database using the following plugin (https://wordpress.org/plugins/advanced-wp-reset/). This will basically remove all of your pages and posts and get to a point of a fresh WodPress installation (ignore this step, if you want to keep your data).

Then setup a child theme by following this guide (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57) and add the following code into your child theme’s functions.php file.

//adjustments to wp-includes/http.php timeout values to workaround slow server responses
add_filter('http_request_args', 'bal_http_request_args', 100, 1);
function bal_http_request_args($r) //called on line 237
{
	$r['timeout'] = 15;
	return $r;
}
 
add_action('http_api_curl', 'bal_http_api_curl', 100, 1);
function bal_http_api_curl($handle) //called on line 1315
{
	curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 15 );
	curl_setopt( $handle, CURLOPT_TIMEOUT, 15 );
}

Now before generating your App demo content again, make sure that you have Revolution Slider plugin is active and also check to make sure that you’re using the latest version of X theme and Cornerstone plugin along with other latest X compatible plugins. You can refer to our version information guide here (https://theme.co/apex/forum/t/troubleshooting-version-compatibility/195). You can then follow our update guide here if required (https://theme.co/apex/forum/t/setup-updating-your-themes-and-plugins/62).

Once you confirm those information, try generating your App demo content and see if that helps.

If you’re still having issues, please provide us with your WordPress login credentials in a secure note to check your issue further.

Thanks!

Thank you for the info, I tried the steps with adding a child theme then adding the code inside the function file but had the same result. I’ll include my login details in a secure note to further look at the issue in adding the App extended demo.

Please don’t let the install page hang for more than 30 minutes or my server will have issues. Its a good private server though with plenty of space. Thank You for your assistance!

Hello Bryce,

Thanks for updating in! I have logged in and checked your site. As soon as I import the demo content, there is an Error 503 happening behind the process. You can check more about it here:

Please increase your PHP time limit to 300s and PHP post max size to at least 128M. You may need to ask further assistance from your hosting provider if you do not know how.

Kindly let us know how it goes.

Thank you for the info!

To increase the limits would adding the following code do the trick:

Adding in the wp-config.php file:

set_time_limit(300);

Then adding the following code to the active theme folder in “wp-content” in the file functions.php?

@ini_set( ‘upload_max_size’ , ‘128M’ );
@ini_set( ‘post_max_size’, ‘128M’);
@ini_set( ‘max_execution_time’, ‘300’ );

Thank you!

Hello Bryce,

Thanks for updating the thread.

You need to add the code into wp-config.php file. I also suggest you to take a look at following tutorial for step by step instruction:

Thanks.

1 Like

Thank you for the info!

I tried adding the code but didn’t have any success with adding the App extended demo. I spoke with my hosting company and they said the best way to manage the settings was inside the PHP selector options. I updated the memory limit through this and had the same result when loading the demo. Is there any other settings that I’m missing in the PHP selector?

Is it best to update the PHP as new versions become available? Currently on 7.2 and noticed 7.3 is available.

Thank You!

Hello Bryce,

Thanks for updating the thread.

It seems that the problem is revolving around App demo. For testing purpose I imported a different demo content and that worked fine. It’s just (so far in my testing) that the App demo is having issues and in dev tools showing 503 (Service Unavailable) message.

I see that the PHP Max Script Execute Time is 30s. Please increase the value as suggested by my colleague in previous reply. You can also follow below tutorial for some help.

Let us know how it goes.

Thanks.

1 Like

Increasing the PHP max script execute time to 300 solved the issues. Thank you for your advice with these issue. Do you recommend keeping these new PHP values going forward? Not very educated in PHP and just wanted to make sure that was ok to keep such high levels.

Thank you for your help!

Hello Bryce,

Thanks for updating the thread.

Usually in most cases it should not create any issues. However, you can rollback the changes to 30s if you would like. In future if some issues comes up like things are not working as they are supposed too, try to increase the values to 300s and test the case again. But for now you can rollback the changes to 30s.

Thanks.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.