Skip to content

Instantly share code, notes, and snippets.

View mojaray2k's full-sized avatar

Amen Moja Ra mojaray2k

  • Miami, Fl
View GitHub Profile

ali.md/pcwp

Step One: Create the custom post type

The following code goes into the functions.php file:

// Create A Somple Product Catalog width Wordpress. ali.md/pcwp
// Step One: Create the custom post type
@mojaray2k
mojaray2k / simple-admin-page.php
Last active August 29, 2015 14:26 — forked from stephenh1988/simple-admin-page.php
A simple class based on a tutorial at WP.Tuts that creates an page with metaboxes.
<?php
/*
Description: A simple class based on a tutorial at WP.Tuts that creates an page with metaboxes.
Author: Stephen Harris
Author URI: http://www.stephenharris.info
*/
/* Copyright 2011 Stephen Harris (contact@stephenharris.info)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@mojaray2k
mojaray2k / gist:f776be6c5d68df210094
Last active August 29, 2015 14:26 — forked from isGabe/gist:3072378
Load jQuery fron Google CDN with local fallback - WordPress style
<?php
/*
**** Load jQuery from Google CDN if available, local fallback if not ****
** Place in your theme's functions.php or relevant file. Edit local jQuery path if needed.
** Works as-is with WordPress Bones Theme v1.2 https://github.com/eddiemachado/bones (replace wp_enqueue_script( 'jquery' ); on line 142
** reference: http://wp.tutsplus.com/tutorials/load-jquery-from-google-cdn-with-local-fallback-for-wordpress/
*/
@mojaray2k
mojaray2k / add-wordpress-settings-page.php
Last active August 29, 2015 14:27 — forked from DavidWells/add-wordpress-settings-page.php
WordPress :: Add Settings Page with All Fields
<?php
/*
Plugin Name: Homepage Settings for BigBang
Plugin URI: http://www.inboundnow.com/
Description: Adds additional functionality to the big bang theme.
Author: David Wells
Author URI: http://www.inboundnow.com
*/
// Specify Hooks/Filters
var getPosts = new Promise(function(resolve, reject) {
$.ajax({
url: ajaxURL + '/posts',
method: 'GET',
success: function( res ){
if (res.length) {
resolve(res);
}
else {
reject(Error("No Posts"));
@mojaray2k
mojaray2k / states_hash.json
Created February 16, 2016 23:24 — forked from mshafrir/states_hash.json
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",

Setting up a WordPress site on AWS

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.

@mojaray2k
mojaray2k / Commands.sh
Created December 30, 2017 15:01 — forked from nrollr/Commands.sh
Install PHP and NGINX on Amazon Linux AMI
## Install NGINX
$ sudo yum install nginx -y
## Install PHP and PHP-FPM
$ sudo yum install php -y
$ sudo yum install php-fpm -y
## Configure NGINX (see below)
$ sudo nano /etc/nginx/conf.d/default.conf
@mojaray2k
mojaray2k / README.md
Created January 23, 2018 16:55 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet