Permalink Settings

WP Admin > Settings > Permalinks

https://dev-staging.eye.fi/wp-admin/options-permalink.php (also to fix redirect loop)
https://dev-staging.eye.fi/wp-login.php

/%category%/%postname%/

'permalink_structure','/%year%/%monthnum%/%postname%/'

UPDATE wp_options SET option_value='/%year%/%monthnum%/%postname%/' WHERE  option_name = 'permalink_structure';
UPDATE wp_options SET option_value='/%category%/%postname%/' WHERE  option_name = 'permalink_structure';
SELECT * FROM `wp_options` WHERE option_name = 'permalink_structure';

UPDATE wp_options SET option_value = NULL WHERE option_name = 'rewrite_rules';
SELECT * FROM `wp_options` WHERE option_name = 'rewrite_rules';

Converting Posts to Pages

  1. Install pTypeConverter plugin
  2. Make sure all posts have unique names
  3. Remove all categories

Post Types

Page

Pages defines:

wp_posts
	ID = 1
	post_type = 'page';

wp_postmeta
	meta_id: 1, post_id: 1, meta_key: '_edit_last', meta_value: '1';
	meta_id: 2, post_id: 1, meta_key: '_edit_lock', meta_value: '1289355265';
	meta_id: 3, post_id: 1, meta_key: '_wp_page_template', meta_value: 'default';

And immediately creates a revision.

SELECT * FROM `wp_posts` WHERE ID = 29

SELECT * FROM  `wp_postmeta` 
WHERE post_id = 29

guid += ?p=29

Post

Post defines:

wp_posts
	ID = 3
	post_type = 'post';

wp_postmeta
	meta_id: 4, post_id: 3, meta_key: '_edit_last', meta_value: '1';
	meta_id: 5, post_id: 3, meta_key: '_edit_lock', meta_value: '1289356052';
	meta_id: 6, post_id: 3, meta_key: '_wp_old_slug', meta_value: '';

And immediately creates a revision.

Excerpt More

Enforce excerpt only from the quicktag

global $more;
$more = 0;

Init Post Object

$post_obj = $wp_query->get_queried_object();

$post_ID = $post_obj->ID;
$post_title = $post_obj->post_title;
$post_slug = $post_obj->post_name;

if(is_category())
{
	$yourcat = get_category($cat);
	//echo $yourcat->slug;
}

WP Config Defaults

<?php
/** Saving FTP Info ( http://www.wprecipes.com/wordpress-tip-easy-upgrades-using-ftp ) */
define('FTP_HOST', 'dev.ayzenberg.com');
define('FTP_USER', 'dev');
define('FTP_PASS', 'Your_FTP_password');
define('FTP_SSL', false); // If you can use a SSL connection set this to true

define('FORCE_SSL_LOGIN', true);
// OR //
define('FORCE_SSL_ADMIN', true);

/** Debug your code efficiently ( http://www.catswhocode.com/blog/best-practices-for-wordpress-coding ) */
define('WP_DEBUG', false);
define('SCRIPT_DEBUG', false);
?>

Create the uploads and upgrade directories in wp-content so you can add plugins and do upgrades via the wp-admin.
Create .htaccess
Make sure each of these directories and files are writable by the same group as the web server.

WordPress Migration Notes

  1. Update /.htaccess to point to the proper directory and make it writable (666).
  2. Update /wp-config.php with new DB info and make it writable (666).
  3. Make sitemap.xml, sitemap and /wp-content/plugins/wp-minify/min/config.php writable (666).
  4. Make /wp-content/uploads and /wp-content/plugins/wp-minify/cache writable (777).
  5. Use phpMyAdmin to Export/Import (includes everything). Using WP Export/Import only includes content.
    1. Export to SQL file with DROP TABLEs, etc.
    2. Search and replace URI references.
    3. Save then Import into the new database.