how to restore a wordpress website, when hosting has got expired but the hosting company gives you a bunches of zip file?

On your new hosting place, create a new/empty WP install. That will create a database. Remember the credentials. Then create a new database, and import the data you got from the old host. Remember the credentials; assign the user/pass to that database. Then go into the new install, inside the wp-config.php file, and change the … Read more

WordPress very high load when click “Publish”

Your problem is in the size of your site. You have huge site and now it’s not enough to have only W3 Total Cache plugin for caching. During publishing post, WordPress performs a lot of database calls, it updates some information about posts in database. So I can suppose that the weakest spot is in … Read more

Site load time increased

It may be that the WP database is a bit ‘cluttered’ with draft posts and other things. I’d recommend an optimizing plugin to optimize the WP database. But it also depends on your traffic. Maybe the amount of traffic indicates a need to upgrade your hosting plan from a shared server to the next level.

Automatically load WordPress page on server every XX hours

You could use the WP-Cron functions to scheduled events. Note though that this is pseudo-cron- it requires someone (or a bot) visit your site for the events to execute. To fire events more reliably, search for scheduling cron jobs (linux) or scheduled tasks (win). Depending on your hosting, you may have access to simple tools … Read more

How to optimize ‘select found_rows()’ query? Several ‘high load average’ alerts daily

This should not break pagination: add_filter(‘pre_get_posts’, ‘optimized_get_posts’, 100); function optimized_get_posts() { global $wp_query, $wpdb; $wp_query->query_vars[‘no_found_rows’] = 1; $wp_query->found_posts = $wpdb->get_var( “SELECT COUNT(*) FROM wp_posts WHERE 1=1 AND wp_posts.post_type=”post” AND (wp_posts.post_status=”publish” OR wp_posts.post_status=”private”)” ); $wp_query->found_posts = apply_filters_ref_array( ‘found_posts’, array( $wp_query->found_posts, &$wp_query ) ); if($wp_query->query_vars[‘posts_per_page’] <= 0) { $wp_query->max_num_pages = 0; } else { $wp_query->max_num_pages = ceil($wp_query->found_posts … Read more