title: Fix pagination after Wordpress 5.5 update
body: <p>After updating my website to Wordpress 5.5 pagination broke.</p>
  <p>If <strong>example.com/news/</strong> is the news page for my website, then following <strong>example.com/news/2/</strong> (that opened the second page of posts before the update) redirects me to example.com/news/.</p>
  <p>It is <a href="https://www.searchenginejournal.com/wordpress-5-5-issues/377851/#ok" rel="nofollow noreferrer">a known problem</a> of the 5.5 update, but I didn't manage to fix it by changing the variable's name.</p>
  <p>Here is how I use pagination on my website:</p>
  <p><strong>The query part:</strong></p>
  <pre><code>$page = ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1;
  $query = new WP_Query( array(
     'posts_per_page' =&gt; 5,
     'paged' =&gt; $page
     ));
  if ( $query-&gt;have_posts() ) : while ( $query-&gt;have_posts() ) : $query-&gt;the_post();
  </code></pre>
  <p><strong>The pagination part:</strong></p>
  <pre><code>echo paginate_links( array (
     'base' =&gt; get_permalink( get_option( 'page_for_posts' ) ) . '%_%',
     'total' =&gt; $query-&gt;max_num_pages,
     'current' =&gt; max( 1, get_query_var( 'page' ) ),
     'format' =&gt; '%#%',
     'show_all' =&gt; false,
     'type' =&gt; 'plain',
     'end_size' =&gt; 2,
     'mid_size' =&gt; 1,
     'prev_next' =&gt; true,
     'prev_text' =&gt; '←',
     'next_text' =&gt; '→',
     'add_args' =&gt; false,
     'add_fragment' =&gt; '',
  ));
  
  wp_reset_postdata();
  </code></pre>
  <p>Using either of this:</p>
  <pre><code>remove_filter('template_redirect', 'redirect_canonical');
  
  remove_action('template_redirect', 'redirect_canonical');
  </code></pre>
  <p>causes 404 error at example.com/news/2/.</p>