Category Archives: Types & Views Toolset

Checklist for moving a PHP-based site from one server to another

Research

  • Make sure server configuration is the same. Install missing php extensions and modules. (A good way of comparing is by diffing the output of phpinfo() between the two servers.)
  • Check the mail configuration on the new server. (Is it Sendmail, Postfix or something else? Is any configuration required to get the mail() function working?)

Move

  • Move files (Best ways are either to pack them in an archive (.tar.gz) or moving the files via sshfs.
  • Set file permissions (files should typically be owned by the web server unless you run some sort of suexec config.)
  • Move databases and create database users on the new server.
  • Move CRON jobs (Crontab, etc)
  • Update DNS records (Don’t forget the MX records for mail, and any SPD records you may have.)

Application-specific: WordPress

  • Disable caching plugins (If you figure this out too late, just comment out define(‘WP_CACHE’, true); from wp-config.php and then Disable -> Enable -> Activate your caching plugin through wp-admin.

Post-move

  • Run CacheCheck to see if your DNS has propagated
  • Monitor site via Pingdom or similar service for errors after the move. (And not only timeout, make sure you check for non-200 HTTP code errors too!)

Anything missing? Post a comment!

Types & Views: Excluding posts/pages from a view.

This is also a good snippet for manipulating WP_Query args in general. For stuff Views doesn’t provide a GUI for yet.

Instructions

Add code in your theme/functions.php (Although creating a Plugin would be better, so we don’t have issues if themes are changed later on)

add_filter('wpv_filter_query', 'exclude_specific_page_func', 10, 2);

function exclude_specific_page_func($query, $settings)
{
  if($settings['view_id'] == 123)
  {
    $query['post__not_in'][] = 456;
    $query['post__not_in'][] = 457;
    $query['post__not_in'][] = 458;
  }
  return $query;
}

Source

Views: Post parent is -not- specific page

More info

Screenshot