February 19, 2018

WordCamp ATX: Jason Cohen

Jason Cohen
Optimizing WordPress (or, how we made http://balsamiq.com 7x faster)

There are lots of techniques and tools to make things faster. Optimization == less. Static files rather than PHP. Fewer database queries.

How fast your page loads (and this includes all links, including all images, etc.) impacts your SEO. So the faster your load time, the better Google will like your page.

Plugin: W3TotalCache

Page cache: when someone hits something on your site (page, post, search, image, etc.), it goes into the page cache. Let’s not recompute everything for the homepage every single time, not hit the database each time. Use ‘Disk Enhanced’ option to refine what is cached, when. It tells the server how to check to see if a page is cached. The Apache server can return a page without WordPress or PHP even getting involved, so speed is enhanced immediately.

Every page has a feed for comments and updates, even if you don’t use them. No reason to cache them for bots who DO use the feeds because Google hits it so infrequently, and you want it to be fresh.

Advanced: Garbage collection interval – can be high number (length of time between refreshing) if you have a low-traffic site.

Nothing from WP-admin, WP-login, WP-chron should be cached.

Cache preload: when cache is purged, this will reload certain pages immediately so that you don’t get a spike when all pages need to be reloaded for visitors.

Minify: each plugin generates a stylesheet. Browser also has to get javascript for theme, plugins. Minify allows you to enter all the javascript links (go to your source code to find them) and make one giant javascript file at the top so it’s all loaded once; it also removes extra space, programming comments. Same with the CSS.

Using Object Cache doesn’t help for most websites.

Content Delivery Network: The more we can get static content that never changes away from the server, the better. Third-party server takes over the static content – if content is in their cache, they serve it and it never hits your own server, from a server closer to the person viewing your site. MaxCDM – a huge amount of bandwidth (around a terabyte) for $40/month.

¡nginx (Engine X)

takes 100M of total RAM
2400 hits/second

100M per connection
50-500 hits/sec

But ¡nginx doesn’t run WordPress or PHP. But it can work together with Apache! It takes all the traffic between browser and Apache and serves as a buffer.

(Insert Jason talking about lots of server configuration stuff I can’t reproduce here… but it’s great stuff. Contact him if you have questions!).

YSlow – Firefox extension with Yahoo! SmushIt!

Optimizes images for you – great for themes. Choose “All SmushIt”.

For ongoing uploading of images, use the plugin WP Smush.it – will smush all future images like SmushIt! did for your initial theme.

Download (PPT, 120KB)

WordCamp ATX: Stephanie Leary

Stephanie Leary
Content Importing & Migrating

She discussed how she has imported sites from a variety of formats including Blogger, Moveable Type, Joomla, Drupal, Twitter, Gallery2, HTML files.

She demonstrated her plugin, Import HTML Pages. She says that it has close to a 100% accuracy rate for converting pages, assuming they are coded cleanly. It even has a clean up option for HTML created by MS Word. She warns that it will choke on an empty file.

She also demonstrated her Gallery2 Importer plugin. It brings all images into the media manager.

Secrets to happy importing:

  • Do a backup!!
  • Be prepared to undo the import.
  • Import on a development server if you can, or turn on maintenance mod.
  • Importing takes a lot of memory.
  • Turn off cross-posting plugins (livejournal, facebook, twitter, etc.) or you will flood all imported posts.
  • Use absolute URLs for linked files.

Useful plugins:

  • DB Backup
  • Mass Page Remover – will allow you to enter range of IDs and will delete them all
  • WordPress Reset – Gives you a clean install
  • Maintenance Mode

WordPress export (.com to .org or .org to .org)

  • will do posts, pages, comments, authors
  • not settings, menus
  • categories unless you changed the slug (gives you a new default if you did)
  • skips users with no posts

Discussed plugins/scripts for less common imports, custom imports, character set conversions (see presentation for more details).

After Importing – Plugins

  • Search & Replace
  • Redirection
  • Add Linked Images to Gallery

Migrating Single Installations into Networks
(see Stephanie’s blog for more details)

  • Back up
  • Be prepared to undo
  • Use development server


XML is simple but limited. MySQL is more complicated but complete; it does become difficult with merging users.

Moving users: “stab yourself in the eye with a fork” (see her presentation and blog for more details).

After migrating:

  • Move static files
  • Change upload file paths
  • options/settings
  • posts
  • theme files

Combine .htaccess.

Stephanie’s presentation on SlideShare

WordPress ATX: Devin Price

Devin Price

Custom Post Types

Custom post types are a way to organize your content in new and interesting ways. They help you transform WordPress into a CMS.

Custom posts aren’t so much ‘posts’ as a custom content type. Another way to think of them is to think of them more like ‘pages’ than posts, because they can be hierarchical with child/parent pages/post types.

‘Native’ WordPress post types include:

  • posts
  • pages
  • navigation menu items
  • revisions
  • attachments

Once you register a new custom post type you will have access to it in your admin panel in the left menu.

By default the custom post type does have all the same options as a regular post (such as category/tag taxonomies), but you can modify or add your own custom taxonomies). You can also remove meta boxes you don’t need (such as comments).

The Estate theme from Woo Themes is a nice example for how to implement custom post types.

Another example is the Quality Control theme, which was designed to do support tickets, and has no ‘regular’ posts.

Question for audience: What are other uses for custom post types?

  • Member directories
  • Product pages & ecommerce
  • Recipes
  • Coffeeshops (see ATX Webshow’s listing)
  • Real estate themes
  • Image uploader template for end users

When might you NOT use a custom post type?

  • If it’s something you want out on an RSS feed, you might want a regular post rather than a custom post type.
  • Don’t make every category a custom post type – just use native categories if you don’t need the extra code and info to keep track of.
  • If you have 20 custom post types, you’re probably doing it wrong!

How to make a custom post type:
1. Use a plugin

  • Custom post type UI
  • WP Easy Post Types
  • TBTestimonials is a plugin that creates custom post types to insert testimonials.
  • CPT-speakers is a plugin that allows creation of new speaker information via custom post types.
  • Calendar Press – custom post types for events.

2. Code it yourself. If possible, this is a better option. Justin Tadlock has a great tutorial on how to do it yourself. Also check the WordPress codex.

Custom post type icons

If you can add custom icons to your custom post types, it will improve the look of your interface. Devin recommends Randy Jensen’s site to get the icons.

Devin’s presentation about custom post types
and his blog posts about custom post types

WordCamp ATX: Theme building (breakout)

Over lunch Ptah Dunbar, a WordPress Core contributor, did a great presentation about creating child themes in WordPress.

His presentation is available online.

WordCamp ATX: Jared Atchison

Jared Atchison
Oops! Common WordPress Mistakes

Adding Javascript to themes

Don’t: add javascript code directly into theme files like header.php
Do: use the actions wp_enqueue_script() and wp_register_script(). You can call the javascript just where you need it.

WP packaged jQuery

Do: use the jQuery code that ships with WordPress (or add your own in no-conflict mode)
Don’t: add your own version of jQuery or remove it simply because you don’t know the proper way to inject your script into WordPress. Adding jQuery directly to theme causes lots of conflicts and problems with the way WordPress functions. Most common issue is multiple copies of jQuery running on one WordPress install (especially if plugins are installed.) Also, cross-compatibility can be lost.

Including files


  • include();
  • require_once();
  • get_header(); get_sidebar; get_footer();

(for more, refer to WordPress codex)

Using Permalinks

You can do almost anything.
Should you do anything? No!!!

Don’t: start page permalinks with %category% or %postname%. Pages + non-numerical starting permalinks = tons of extra rules. (Custom post types excluded.) Read more about what this is bad practice.

Do: Use a numerical reference to start permalink.

Building a theme

Don’t: start from scratch unless you have to.
Do: Build on something that’s proven. A blank theme or framework is a good starting point. You can also build on top of Twenty Ten, the default WordPress theme.

Don’t: build on top of themes that suck!

Troubleshooting (do it!)

Errors? Warnings? Notices? White screen of death?
Don’t panic!

Most problems you can debug yourself.

  • define(‘WP_DEBUG’,true);
    (found in WP-config)
  • deactivate plugins
  • deactivate themes
  • IRC #wordpress on irc.freenet.net
  • 3rd party assistance: WP Tavern, StudioPress forums, Google, Twitter, IRC in WordPress channel
  • Staying informed

    Do: Follow helpful WordPress sites

    (see Jared’s presentation for links)

    Find Jared’s presentation on his website.

    WordCamp ATX: Nick Batik

    Nick Batik
    Migrating Static Sites
    (or, what to say when people tell you, “You can’t do that in WordPress…”)

    Nick shows how he converted the content of a book to a WordPress website in a week (using the electronic text files).

    Nick is demonstrating Pods CMS. Use the full power of the MySQL database WordPress is using.

    Powerful plugin that allows you to create different templates and pull information directly out of the database for website rather than create individual posts/pages for each chunk of information. You have full power of PHP to manipulate data.

    Once text is imported, you have an edit box, article information, other data fields.

    You can create a lot of content with interacting pieces such as bibliographic reference information, which is difficult to find via the standard search box. You can link the reference to a specific line in the original text.

    You can export your Pods package to use for another website or for sale.

    When does it make sense to use Pods?

    • Set different user levels not possible with custom post types
    • When you have different kinds of data types
    • When you have a lot of necessary interaction of data (For example, because you can use PHP, you can do live conversion of pounds to grams within WordPress)
    • Pods relate different datatypes (images, text, taxonomies) to one another.

    For more information on Pods, check out the Pods CMS website. They have a good user guide, Q&A, and chatroom. (FYI, the forum on the Pods site is running Pods).

    Download (PDF, 375.12KB)

    WordCamp ATX: Bill Erickson

    Bill Erickson
    WordPress Beyond Blogging

    Ways to extend and customize WordPress. As Bill puts it,

    I love using WordPress as a CMS because it empowers people to control their own website.


    Two types:

    • Options-based – more streamlined, easier to use
    • Code-based – better for development (more control)

    Thesis is in the middle. Genesis is more on the code side.

    Bill demonstrated what you can build fast using frameworks. They can be an efficient design tool.

    Thesis is good for clients to tweak design if that’s desirable, but it can also cause problems (they can break site design).

    Doesn’t think that updating frameworks is critical – usually updates are just added features. If updating might affect site, there’s no real need to do updates. (NB: Of course, you would want to update the WordPress installation for security, etc. reasons).

    If you use a child theme, you can update the framework/theme, because your custom design resides in child theme files rather than core theme/framework files.

    Custom Post Types, Taxonomies, Meta Boxes

    Custom post types allow you to organize content in logical ways. You can strip post window down to just the necessary options, which is easier for the client.

    Custom Post Type UI
    More Fields

    Multiple Columns

    Multiple columns are great to make WordPress more of a CMS. Using HTML in editor is not recommended. You can use sidebars to create extra columns, but it divides page content. Shortcodes can work, but it’s a lot for clients to remember.

    Solution Bill uses: unused headline tag (e.g. h6). Runs filter to look for that code and then creates div to make a new column.


    Easy to create your own widgets.
    Don’t install Exec PHP plugin – don’t put PHP in sidebar, can break site.
    If you create your own widget then you can drop your PHP in that.


    • Widget Logic – write logic for where widgets will show up
    • Widget Classes – allows custom styling

    Custom Queries:

    • query_post(s)
    • new WP_Query
    • get_posts()

    (Code will be linked in the notes, will be posted later)


    Easier than using HTML/other code for clients to add content to site.


    Bill recommended work by Justin Tadlock, a great resource for people using WordPress.

    Also see:
    WordPress Development Updates
    Otto on WordPress

    Ethics on using frameworks: can you charge the client the same amount if it takes you half the time? Bill’s answer: you may save time coding but there is still a lot of customization and expertise involved. But the product is better because you’re building on a solid codebase. The value of your work is better. It’s comparable to using WordPress rather than static HTML.


    Adds community features to the site. Bill uses Genesis because there’s a Genesis-specific plugin to work with BuddyPress.

    In describing work he did for a client, Bill said,

    I feel like a happiness engineer.


    Please visit Bill’s website for WordCamp Austin – WordPress Beyond Blogging

    WordCamp ATX: John Chandler

    Welcome to WordCamp ATX 2010.

    I’ll be posting throughout the day from WordCamp Austin, both here and on Twitter at #wcatx.

    First speaker: John Chandler
    Before the Famous Five Minute Install

    First question: to ask: Is WordPress the best choice?
    Answer: YES!

    WordPress.com vs Self-Hosted
    With self-hosting you get the power to do whatever you want. You get complete control over your site and choose your own options. Downside is you also have to manage your own security.

    Don’t host WordPress on a Windows server.

    Questions to consider about your site:

    There is so much to think about when starting a website.

    • Who is your target audience?
    • What actions do you hope your audience will take?
    • Who are your main competitors? How do you differ?
    • What are 3-4 key concepts do you hope someone will take away from your site?

    Consider look and feel.

    Moo’d cards

    Omnigraffle is a great program for flowcharts on the Mac.
    also: balsamiq

    Sitemaps, flow charts, wireframing


    Free themes
    WordPress does review all free themes that they make available through the WP repository.

    Pro Themes
    Some people like:

    Often pro themes have several options built in to allow you to customize.

    May be vanilla but offers a lot on the backend for customization

    • Thesis
    • Genesis
    • Thematic

    Custom Themes
    Most expensive option
    Many will be built on frameworks


    Doing a client questionnaire is a great idea – if the client can’t/doesn’t want to answer questions, this is a red flag. There is a lot that goes into a website and clients need to be prepared.

    Going rates for WordPress development in Austin:

    Anything we can create in Photoshop we can do in WordPress. Websites do not need to look like a blog.

    E-commerce suggestions:

    • PHP Purchase
    • Shopify

    John has his presentation on his website: Before the Famous Five Minute Install

    Austin WordCamp Schedule – Saturday, Dec. 4th

    Here’s the breakdown of the schedule for Saturday. The doors at Cospace will be open by 8:00 am for those who are early birds & want to get setup, grab an early cup of coffee, etc.

    9:00-9:30 am
    Welcome & breakfast

    9:30-10:15 am
    John Chandler
    Before the Five Minute Install

    10:30-11:15 am
    Bill Erickson
    WordPress Beyond Blogging

    11:30 am-12:15pm
    Nick Batik
    Migrating Static Sites


    Jared Atchison
    Common Mistakes

    Devin Price
    Custom Post Types

    Stephanie Leary
    Content Importing

    Jason Cohen
    Optimizing WordPress

    Closing Panel