WordPress & Heroku – WordPress Database Optimization

This post follows the post Heroku & WordPress Website Deployment which details how to create and publish a website using WordPress and Heroku. This post details how to clean-up and optimize your WordPress database using plugins and WordPress features to minimize your Heroku database requirements.

Using WordPress Optimization Features

As you add more content to your website, change things, and activate plugins, your database entries are modified and the database increases in size. This could make your website slower as it takes longer for the server to retrieve information from the database. Also, the ClearDB add-on for Heroku has a free tier which is capped at 5MB. If your database passes 5MB, you will no longer be able to write to the database and will have to pay for the next higher tiered plan. Therefore, regularly cleaning and optimizing your database is a good idea to keep the database size at a minimum. Check out the database description page on WordPress.org for more information about WordPress core tables.

One way is to used a database management tool to interface with your database. phpMyAdmin is the most common way to manage a WordPress database. If you are not using cPanel as your hosting control panel, your hosting plan may be using a different MySQL management tool to phpMyAdmin. This is fairly technical and detailed so if you would like to explore this option, see this page for more information.

WordPress has a native tool that allows you to repair and optimize your database. More information about this tool is available in the Automatic Database Optimizing section. To activate this tool, you must first add the following line to your website wp-config.php file.

Continue reading

WordPress & Heroku – Website Integration With CloudFlare

This post follows the post Heroku & WordPress Website Deployment which details how to create and publish a website using WordPress and Heroku. This post details how to integrate your website with CloudFlare for performance and security services

Importing Your Website to CloudFlare

CloudFlare is a company that provides a Content Delivery Network (CDN), distributed domain name server services, and internet security services. CloudFlare works by positioning its servers between the website hosting provider (Heroku in our case) and the website visitors. This is done by transferring the domain to CloudFlare’s name servers so CloudFlare can handle the DNS records. As a result, CloudFlare’s network protects, speeds up, and improves availability for our website. They accelerate the website’s content by edge-caching and other techniques while also offering additional availability and security features to automatically handle DDoS and other real-world problems. Finally, they also a free SSL certificate so all of our visitors can have a secure connection the our website. Since website speed and secure connection availability are used in Google’s page rank, these services also improve the SEO of our website.

The first step is to create a CloudFlare account and import your domain using the importing tool. More details on this process are available at this CloudFlare article.

Continue reading

WordPress & Heroku – Custom Domain Name Configuration

This post follows the post Heroku & WordPress Website Deployment which details how to create and publish a website using WordPress and Heroku. This post details how to setup a custom domain name registered through GoDaddy and integrating it with Heroku.

Custom Domain Name Configuration

By default, Heroku assigns each application a URL resembling applicationname.herokuapp.com. However, some users may prefer to use a custom domain name, like example.com instead. Heroku has written a detailed blog post titled “Custom Domain Names for Apps.”  The relevant portions are below with specific details regarding GoDaddy domain name hosting.

Heroku allows the users to add custom root domains and subdomains using the Heroku CLI. Examples of the code are shown below.

To verify the domains are added, run the following command.

Continue reading

WordPress & Heroku – Updating Website Content, Themes & Plugins

This post follows the post Heroku & WordPress Website Deployment which details how to create and publish a website using WordPress and Heroku. This post details how to update your content, plugins, and themes due to Heroku’s unique file system.

Updating Content, Plugins & Themes

Heroku doesn’t allow for files to be stored permanently on the dyno’s filesystem.This is a problem if we want to include files such as images on the website. The easiest solution is to use a cloud based sotrage service like Amazon AWS to store the files for you. There are multiple plugins that connect your WordPress dashboard to your Amazon AWS accounts. I prefer to just manually upload my files to AWS Simple Storage Service (S3) myself and insert the image from the URL provided by Amazon for that file.

Since Heroku doesn’t allow files to be written and stored on their file system, we have to update and install plugins, themes, and new versions of WordPress locally and then push them to Heroku. Composer is used to provider version control of installed plugins, themes, and the WordPress version. The download and installation instructions for Composer are available here.

To install a theme, first identify the download link where the theme is available. You can search for your plugin or theme on WordPress Packagist at WordPress.org. The link for the decode link is replicated below as an example:

Continue reading

Developing a Naval Correspondence Document Generator

This page details the progress I have made developing a web template to correctly format official military documents. The goal of this project was to eliminate time revising and editing errors in official correspondence by developing a web based interface that would allow a user to select the required fields and submit their content and immediately receive a properly formatted document for their review.

Why Was This needed?

In the Department of the Navy as well as the United States Marine Corps, official documents are required to follow strict formatting rules in order to ensure proper handling and dissemination. The official reference publication that describes these requirements is the Correspondence Manual (SECNAV Manual M-5216.5). The manual includes procedures for e-mail, faxes, memorandums, and business letters. The majority of official documents created and handled on a daily basis is the standard naval letter.

This format was developed when documents were written on typewriters requiring specific number of spaces between elements in the document. However, the formatting required isn’t easily recreated on modern day word processing software. This typically results in small errors which require extensive man-hours to edit and revise, often going through multiple drafts as it works it way from the originator, up the chain of command, and finally to its destination. Continue reading

Koran, Kalashnikov and Laptop – Discussion Guide

The questions below are meant to be used in a guided discussion on the book Koran Kalashnikov and Laptop by Antonio Giustozzi. A brief synopsis of the book is reprinted below from Amazon.

Koran Kalashnikov and Laptop by Antonio Giustozzi
“Since the Allied invasion of Afghanistan in 2002, the Bush administration has celebrated the imminent demise of the Taliban, with claims of a “moral and psychological defeat” playing a prominent role in the presidential elections of 2004. Some commentators suggested that “reconstruction and development” had won over the Afghan population, despite widespread criticism of the meager distribution of aid and failed attempts at “nation building,” not to mention the infamous corruption of Kabul’s power-hoarding elites.

In March 2006, both Afghan and American officials continued to assert that “the Taliban are no longer able to fight large battles.” Unfortunately that theory would soon collapse beneath the weight of a series of particularly ferocious clashes, causing the mood in the American media to turn from one of optimism to one of defeatism and impending catastrophe. Suddenly faced with a very sophisticated and creative form of guerilla warfare, the West found itself at a loss to fight an insurgency that bore little resemblance to its former enemy.

In the first book ever to be published on the neo-Taliban, Antonio Giustozzi provocatively argues that the appearance of the neo-Taliban should in no way have been a surprise. Beginning in 2003, a growing body of evidence began to surface that cast doubt on the official interpretation of the conflict. With the West cutting corners to maintain peace within the country, which included tolerating Afghanistan’s burgeoning opium trade, the Taliban was able to regroup and grow in strength, weapons, and recruits. Giustozzi’s book poses a bold challenge to contemporary accounts of the invasion and its aftermath and is an important investigation into the rise and dangerous future of the neo-Taliban.”

Continue reading

Islands Of The Damned – Discussion Guide

The questions below are meant to be used in a guided discussion on the book Islands of the Damned by R.V. Burgin. This book is in the Career Level Officer section of the 2013 United States Marine Corps Commandant’s Reading List. A brief synopsis of the book is reprinted below from Amazon.

Islands of the Damned by R.V. Burgin
“R.V. Burgin reveals his experiences as a Marine at war in the Pacific Theater, where Company K confronted snipers, ambushes along narrow jungle trails, abandoned corpses of hara-kiri victims, and howling banzai attacks as they island-hopped from one bloody battle to the next. During his two years of service, Burgin rose from a green private to a seasoned sergeant, and earned a Bronze Star for his valor at Okinawa.

With unforgettable drama and an understated elegance, Burgin’s gripping narrative chronicles the waning days of World War II, bringing to life the hell that was the Pacific War.”

Continue reading

Black Hearts – Discussion Guide

The questions below are meant to be used in a guided discussion on the book Black Hearts by Jim Frederick. This book is on the Career Level Officer group of the 2013 United States Marine Corps Commandant’s Reading List. A brief synopsis of the book is reprinted below from Amazon.

Black Hearts by Jim Frederick
“This is the story of a small group of soldiers from the 101st Airborne Division’s fabled 502nd Infantry Regiment—a unit known as “the Black Heart Brigade.” Deployed in late 2005 to Iraq’s so-called Triangle of Death, a veritable meat grinder just south of Baghdad, the Black Hearts found themselves in arguably the country’s most dangerous location at its most dangerous time.

Hit by near-daily mortars, gunfire, and roadside bomb attacks, suffering from a particularly heavy death toll, and enduring a chronic breakdown in leadership, members of one Black Heart platoon—1st Platoon, Bravo Company, 1st Battalion—descended, over their year-long tour of duty, into a tailspin of poor discipline, substance abuse, and brutality.

Four 1st Platoon soldiers would perpetrate one of the most heinous war crimes U.S. forces have committed during the Iraq War—the rape of a fourteen-year-old Iraqi girl and the cold-blooded execution of her and her family. Three other 1st Platoon soldiers would be overrun at a remote outpost—one killed immediately and two taken from the scene, their mutilated corpses found days later booby-trapped with explosives.

Black Hearts is an unflinching account of the epic, tragic deployment of 1st Platoon. Drawing on hundreds of hours of in-depth interviews with Black Heart soldiers and first-hand reporting from the Triangle of Death, Black Hearts is a timeless story about men in combat and the fragility of character in the savage crucible of warfare. But it is also a timely warning of new dangers emerging in the way American soldiers are led on the battlefields of the twenty-first century.”

Continue reading

ISIS Propganda Analysis Published on Yahoo! Finance

While many experts say the Islamic State group in Iraq and Syria is on the decline, you wouldn’t know it from the organization’s public narrative.

ISIS aggressively promotes the attacks it directs, supports or inspires. The extremist group recently took credit for attacks in Orlando and Brussels, reinforcing its image of being an unstoppable and legitimate network. And it has built that image through a troublingly savvy combination of traditional and new media.

ISIS’ propaganda engine yields four key marketing insights that highlight why the group’s messaging is so resilient. Check out my latest take in Yahoo! Finance breaking down ISIS’s propaganda strategy and identifying insights useful for any modern day marketing campaign.

The piece, titled “Here are the disturbing reasons ISIS marketing is so effective,” was published at Yahoo! Finance on August 27th.

Continue reading