Error in Admin paging

Asked

Viewed 111 times

0

Hi, I migrated from the site web.dominio.com.br for www.dominio.com.br, I did not change folder only from url. I changed the siteurl and the home in wp_options, made a replace in the wp_posts, wp_options and wp_postmeta, changing the urls, the site and menu work properly, but there is an error in the paging in Admin.

When I access all Posts and click to Sort by Date or to go to the next page he is calling the url ancient, http://web.dominio.com.br/wp-admin/Edit.php? orderby=date&order=desc

Has anyone been there or has any idea what that mistake might be?

2 answers

0

If I’m not mistaken, the internal pages of Wordpress do not use the options you changed in the bank. This works along with the rewrite Ules, 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.

  • Caio does not hear folder changes, only the change of the Site URL, I have disabled and activated the permanent links but continues with the error

  • you tried to change the folders? I believe the problem is there

  • The site is in the Root /var/www/html/ I didn’t change the folder The WP installation was on web.dominio.com.br, to run in parallel with the old site that was on another server. Next I made a change from web.dominio.com.br to www.dominio.com.br, the links are working only the pagination in the Admin that is calling the web.dominio.com.br

0

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

  1. Dump the database, open in a text editor and replace all references to the old address. Then reload the database.
  2. Changes the permalink structure to default.
  3. In the settings check if the site_url and home_url are right and saved again.
  4. Back the permalink structure pro that you used.

This certainly didn’t solve your problem in wp-admin, but at least now in BD and . htaccess is all right.

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

  1. Reconfiguring the server
  2. Fix by wp-config.php

Since we don’t always have control over the (bad) server configuration, let’s 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 encounter any more errors, you can try a more complete solution such as at this link

  • the $_SERVER['HTTP_HOST'] is pointing to the correct address.

  • strange, because the links that are pointing to the old site use exactly this variable... you tried to put in wp-config the change of hettp_host pro forwarded_host?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.