The ultimate checklist for pushing a WordPress site live (2020)

Web Development
Read more of the post "The ultimate checklist for pushing a WordPress site live (2020)"
Sometimes you need to open and update all pages of a WordPress website to get changes to take place.
This might be due to a newly added plugin, or simply a re-organisation of the theme architecture or layers.
If your site has a lot of pages, this can become a hideous task.
With the help of a small function, we can achieve this programmatically, just change the post_type to match what you want to update (post, page or custom post type).
Just add this snippet on the function.php of the theme you are using.
If you are unsure on how-to, this is an excellent guide from WP Beginner.
IMPORTANT! Don’t forget to remove the code once the update has been completed!
// Update all post function update_all_posts() { $args = array( 'post_type' => 'page', 'numberposts' => -1 ); $all_posts = get_posts($args); foreach ($all_posts as $single_post){ $single_post->post_title = $single_post->post_title.''; wp_update_post( $single_post ); } } add_action( 'wp_loaded', 'update_all_posts' );
If you need any help with WordPress development, get in touch!
Web Development
Read more of the post "The ultimate checklist for pushing a WordPress site live (2020)"
Business Success
Read more of the post "Why do you need to have a budget for your web design project"
Business Success
Read more of the post "Stop ignoring web accessibility and rank higher in Google"