// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
*/ | |
$args = array( | |
//////Author Parameters - Show posts associated with certain author. |
<?php | |
/* | |
Usage: | |
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
if ( !$frag->output() ) { // NOTE, testing for a return of false | |
functions_that_do_stuff_live(); | |
these_should_echo(); | |
// IMPORTANT | |
$frag->store(); | |
// YOU CANNOT FORGET THIS. If you do, the site will break. |
$args = array( | |
'author_email' => '', | |
'ID' => '', | |
'karma' => '', | |
'number' => '', | |
'offset' => '', | |
'orderby' => '', | |
'order' => 'DESC', | |
'parent' => '', | |
'post_ID' => '', |
ALTER DATABASE 'my_wp_database' CHARACTER SET utf8; | |
ALTER TABLE 'wp_comments' CHARACTER SET utf8; | |
alter table 'wp_comments' change comment_content comment_content LONGTEXT CHARACTER SET utf8; | |
alter table 'wp_comments' change comment_author comment_author LONGTEXT CHARACTER SET utf8; | |
update `wp_posts` set `post_content` = replace(`post_content` ,'á','á'); | |
update `wp_posts` set `post_content` = replace(`post_content` ,'é','é'); | |
update `wp_posts` set `post_content` = replace(`post_content` ,'í©','é'); | |
update `wp_posts` set `post_content` = replace(`post_content` ,'ó','ó'); |
<?php | |
/* | |
* Plugin Name: Paulund WP List Table Example | |
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area | |
* Plugin URI: http://www.paulund.co.uk | |
* Author: Paul Underwood | |
* Author URI: http://www.paulund.co.uk | |
* Version: 1.0 | |
* License: GPL2 | |
*/ |
<?php | |
/** | |
* Don't update this plugin | |
* | |
* This prevents you from being prompted to update if there's a public plugin | |
* with the same name. | |
* | |
* @author Phil Wylie | |
* @link http://link.from.pw/1cFfcFZ | |
* @param array $r Request arguments |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://i.imgur.com/qX4w7.gif [L] | |
</IfModule> |
This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.
This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.
If you experience any difficulties or have any feedback, leave a comment. 🐬
Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.