How to setup WordPress with Forge and DigitalOcean

Laravel Forge is a service that handles creating servers on popular cloud hosting providers. I use it to host my WordPress sites with DigitalOcean and to handle auto deployments from a git push.

Installing WordPress on a cloud server you need to plan for failure. Typically there is no guarantee that you will not wake up one morning and find the server just gone. I’ve personally ran into that with AWS in the past and now I always plan for it. Continue reading “How to setup WordPress with Forge and DigitalOcean”

8 Laravel Packages For Your Next Project

The best way to spread Christmas Cheer, is singing loud for all to hear.

Buddy The Elf

Since my singing is terrible, I’m going to spread developer cheer by posting my eight favorite Laravel packages of 2014. These are in alphabetical order.

Carbon

This is included in the Laravel core but it’s worth mentioning because of how much I use it. Dealing with dates has never been easier.

Debugbar

All the behind the scenes information you need to ensure your app is running smoothly and efficiently.

Envoy

Envoy allows you to run SSH commands on a remote system. I use it for everything from local tasks to deployments.

Laravel DomPDF

This makes creating PDF’s nice and simple by wrapping the DomPDF library in a Laravel familiar syntax.

Laravel Generators

Speed up your workflow with these time-saving generators. It includes commands for almost everything.

Laravel IDE Helper

If you use PhpStorm then this package is a must have. I use it on all my projects and it makes your IDE play nicely.

Intervention

Every project seems to have to deal with image uploads in one form or another. Intervention makes image uploading and processing a breeze.

Parsedown

I use this whenever I need to parse markdown. It is fast, consistent, and easy to use.


All the projects I worked on this year, Snappy and one or two side projects, were really focused and I didn’t have a chance to implement a lot of the other packages. Hopefully, that changes over the next year because the community has created so many. I’d love to have the time to explore all of them.

Thanks to everyone who created in 2014!

Did I miss your favorite? Share in the comments.

WordPress Total Words Counter

As the year is coming to a close a lot of sites are creating year in review style posts. I love these because I find it interesting how my stuff compares to them and I try to find little nuggets of information on what I should be doing better.

Alex King has been doing this for the past 9 years and has created a little gist for generating a lot of useful stats.

To take this a step further I wanted to count the total words I published for the year and I put together a little script if you’d like to do the same:


<?php
$words = 0;
$posts = query_posts([
'posts_per_page' => –1,
'year' => '2014',
]);
foreach ($posts as $post) {
$words += str_word_count($post->post_content);
}
echo 'Total Words: '. number_format($words);
?>

Granted this method is simple and the php function str_word_count is not entirely accurate. If you’d like to get fancy a Word Stats plugin does exist but I found that it wouldn’t work at all with the current version.

I came across this site and it says my first pull request was four years ago to the Fuel PHP framework. As far as I remember this isn’t my real first pull request. Just the first on GitHub.

Back then I was big into CodeIgniter and they either used HG or Git, but the project was on Bitbucket. So I’m sure my true first would have been around a year or so earlier.

It is interesting thinking back and seeing how much has changed in the PHP landscape since then. Four years ago composer didn’t exist, Laravel didn’t exist, as well as many of the packages we rely on today.

Imagine all the changes that will happen over the next four.

Minimal Genesis: New WordPress Theme

I’m happy to announce my first ever WordPress theme which is modeled after a previous design of this site. It’s simple, clean, with a focus on typography and includes several post formats to make your site unique.

Theme Example
Theme Example

The theme came to life earlier this year when I wanted to rebuild this site. I am constantly changing the design and finally decided that I had spent way to much time looking for a perfect theme. All the theme markets focus on designs with lots of images and complexity. I wanted to go back to basics and have something that would look nice without images.

Minimal Genesis Theme Features

This is a child theme for the popular Genesis framework. The parent theme is a requirement and it is commercial. Genesis is widely used and has tons of nice features for your site.

This theme features everything included with Genesis as well as:

  • Post formats – Linked, Quote, Image, and Standard
  • All WordPress common features
  • Search Engine Friendly
  • Clean and Minimal

Post Formats

I view personal blogging as a journal. As such your theme should have the ability to support long-form posts, quotes, and links.

Link Post

Link Post
Link Post

I believe a link post should have the title linked to the actual site you are writing about. You can set this style up by selecting the “link format” in the post sidebar and then adding an extra field named “link” with the value of the url. Here is a screenshot of the custom field setting:

Quote Post

Quote Post
Quote Post

This is an example quote style post format. To set this up select the quote format in the post edit sidebar. Then have the quote as the first part of the content. To style the author name set the name to bold or em.

Featured Image

Featured Image
Featured Image

Featured images are supported and will appear above the title and be the full size of the post box.

Buy It Now

If you like this theme you can buy it now at Creative Market. If you’d like to give it a test drive check out the theme demo.

Twitter Cards for One-Click Newsletter Signups

Last week I moved my Laravel Newsletter off a self hosted newsletter application and over to Campaign Monitor. While I was working on the move I remembered a post by Ryan Battles on how to integrate one-click Twitter signup and decided to set it up.

Integration was super easy and in fact it would even work with the self hosted app Sendy if you have an SSL. I didn’t.

To get started I filled out all the instructions and downloaded Ryan’s free psd template. A few minutes of customizing and I was up and running.

laravel-newsletter

I pushed the Twitter card live on November 28th and have already seen good results. In five days, around a holiday, I added over 100 new subscribers from just the card. I assume that is a decent number.

I am curious to see how it works over a longer time frame or if this is just a short term gimmick.

30 Day Blogging Challenge

Last month I took a 30 day blogging challenge. The goal was simple, write a new post every weekday for a month. Sounds easy right.

November had 20 weekdays and I managed to publish 16 posts. Which I honestly consider a success considering we had a holiday and I attended a conference. It’s the most posts in one month I’ve ever done on this site.

What I found most interesting is how much social media has taken over blogging. Instead of really thinking about an idea and putting into a long form post, I write quick 140 character summary and after 10 minutes it’s forever lost in the abyss.

Going forward from this I do want to get into a better blogging routine, not daily but at least two posts a week. I believe this will help me improve my writing and get better at writing longer form articles.

Have you ever tried a challenge like this? If so, what was your results? Would you be interested in doing it?