Call Us : +1-678-551-2452
+91 77381-86899

WordPress Admin Prev / Next page links still pointing to the old site

After migrating a WordPress-based website from one domain to another and changing the old domain to the new one in the Settings–>General–>Wordpress URL & site URL everything seemed to be working fine. But after logging as Admin and navigate to Next page option on all pages, it continued to point to the old URL.

Below is the solution:
Open the file wp-admin/includes/class-wp-list-table.php

Search for ‘function pagination’
You will find below line of code to set the current url
$current_url = set_url_scheme( ‘http://’ . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’] );

$current_url is built using $_SERVER[‘HTTP_HOST’] which will not work for the servers running under proxies
so change this URL or basically hardcode it with your server URL as below:

$current_url = set_url_scheme( ‘’ . $_SERVER[‘REQUEST_URI’] );

Leave a Reply

Pay with PayPal

Icon Web Solutions Service
Other Amount:


It has been a great pleasure working with Icon Web Solutions on the development of my digitized logo and website. From the initial phases of web design, the Icon Web Solutions team has been a pleasure to work with
Naren, USA