Recently I changed the url of my site from to, one thing I just came across in the admin area for posts, custom post types, pages, where there are more than one page of posts, the arrows for next, previous, first & last page, are all pointing at

I've done a find and replace for atlas in the db, but perhaps I'm not looking in the right place, and it returned 0 results, and WP_SITEURL & WP_HOME in wp-config are both set to

The same applies for Title, Author, Date at the top of the columns for sorting.


  • Are you using any sort of caching? – mor7ifer May 14 '12 at 17:19
  • nope not yet, site is still under development – Chuck May 14 '12 at 17:27
  • What function are you using for your next/previous links? – mor7ifer May 14 '12 at 18:35
  • This is just the untouched wordpress backend, not pagination on the front end, if that's where you were heading with your question. – Chuck May 14 '12 at 18:39
up vote 2 down vote accepted

Ok so apparently this site is behind a firewall or proxy.

On lines 491 and 658 in wp-admin/includes/class-wp-list-table.php, replace this line $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];


if(!empty($_SERVER['HTTP_X_FORWARDED_HOST'])){ $hostname = $_SERVER['HTTP_X_FORWARDED_HOST']; } else { $hostname = $_SERVER['HTTP_HOST']; } $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $hostname . $_SERVER['REQUEST_URI'];

Thanks goes to for posting this fix.

Now the question is there any way to do this without editing core files? If anyone can post that I'll mark that as the accepted answer, I haven't had to modify my core yet, and I'd prefer to keep it that way.

  • 1
    Please post your question about doing this w/o editing core as a new question and link back to here for context ... I definitely want to see how this can be done w/o hacking core ... – EAMann May 21 '12 at 15:55
  • New question posted, – Chuck May 21 '12 at 16:56

Check Settings » General and make sure WordPress Address (URL) and Site Address (URL) are both set properly. Then go to Settings » Permalinks and reset your permalink structure.

Also, you should do a global find in your database, but not necessarily replace (although if you're doing a find/replace from to or it should be safe). Either way, back up your database before doing any global operations.

Edit: Okay, one more idea then I'm stumped. Try the Relocate Method - add this line to wp-config.php before the "stop editing" line: define('RELOCATE',true);, go to wp-login, log in as normal, go to Settings->General, make sure both URL's are correct, save settings, then remove that line from wp-config.php.

  • WordPress Address (URL) and Site Address (URL): Correct, Permalinks: Reset, Global Find: Found Nothing – Chuck May 14 '12 at 19:11
  • So the word 'atlas' appears nowhere in any of your files and anywhere in your database? That doesn't make any sense at all. Try doing a SQL dump, load it into Notepad++, and do a find in there, or search using phpMyAdmin (use the % wildcard on either side of 'atlas'). It has to exist in one of those 2 places (files or database) to show up at all. – SickHippie May 14 '12 at 21:09
  • I realize it makes no sense, and it's driving me nuts, I just did a db dump, opened it in notepad, nothing. Downloaded the entire site locally, searched every file in each directory, found one instance of atlas, and was commented out in a css file. I'm stumped. I know it has to be coming from one of these places. – Chuck May 15 '12 at 20:00
  • One more thing for you to try, then I'm out of ideas. Updated my post to reflect. – SickHippie May 15 '12 at 20:44
  • 1
    I'm currently trying to work backwards to figure out where exactly wp is pulling this url from, will update if I have any success, thanks for your attempts. – Chuck May 18 '12 at 12:29

Try a find/replace in the codebase. Whatever plugin is creating that custom post type may have hardcoded URLs to those assets/links.

  • Just searched, turned up nothing, I should have been less specific above, it actually happens for all posts & pages. – Chuck May 14 '12 at 18:29

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.