Admin pagination error

0

Hello, I did a migration from web.domain.com to www.domain.com , I did not change the url . I changed the siteurl and home in wp_options , I made a replace in wp_posts , wp_options and wp_postmeta , changing urls , the site and menu work correctly, but there is a paging error in Admin.

When I access all Posts and click on Sort by Date or to go to the next page it is calling the old url link

Has anyone ever had this or have any idea what this error might be?

    
asked by anonymous 19.05.2015 / 23:07

2 answers

0

If I'm not mistaken, the internal pages of WordPress do not use the options that you have changed in the bank. This works, along with rewrite rules, for the front end of the site. The back takes into account the folder structure where it is. Try migrating the files to see what happens.

    
20.05.2015 / 00:22
0

The links you are using are generated by the WP_List_Table class and have nothing to do with the database. Nevertheless, before we try any repair, it is good to clean the link in the database and restart the permalinks (just to be sure):

  • Dump the database, open it in a text editor, and replace all references to the old address. Then reload the database.
  • Changes the default permalink structure.
  • In the settings check if site_url and home_url are right and save again.
  • Returns the structure of permalinks you used.
  • This certainly did not solve your problem in wp-admin, but at least now in BD and .htaccess everything is fine.

    Your problem is in a server variable. WP_List_Table uses the variable $_SERVER['HTTP_HOST'] to get the address you were. This error usually happens with servers that are behind a badly configured proxy or firewall. To resolve you can:

  • Reconfigure the server
  • Fix for wp-config.php
  • Since we do not always have control over the (bad) configuration of the server, we will put a patch on wp-config.php , before the line require_once(ABSPATH . 'wp-settings.php');

    if ( ! empty( $_SERVER['HTTP_X_FORWARDED_HOST'] ) ) {
       $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
    }
    

    This should solve the problem. If you find any more bugs, you can try a more complete solution, such as this link

        
    21.05.2015 / 04:43