WordPress hack attack
Date, time & location: Sunday, 9-9:50 a.m., New Media Central 1
Description: The basic WordPress website is pretty stripped down, but plug-ins and themes can perk up its appearance, simplify your workflow, and streamline your mobile delivery. The former director of CoPress will show you some of the best add-ons, teach you some nifty design tricks, and tell you how to keep your site running at peak efficiency.
Session Outline (in-progress)
Edit this document: http://db.ly/cma11hack
Who I am and why I'm here
- Daniel Bachhuber
- digital media manager at CUNY J-School, previously CoPress and Publish2
- WordPress multisite at CUNY with 265+ sites, WordPress for my personal site
- Started using WordPress in 2007 at the Whitman Pioneer, almost entirely self taught, several things I wish I had known earlier
- danielbachhuber.com and firstname.lastname@example.org
Goals for the next 50 minutes
- Informal discussion of WordPress in a newsroom environment
- Recognition of who is in the room so there can possibly be later collaboration
- Introduction to topics you may be unaware of
- Practical takeaways you can implement right away
- Answer other questions you have. Feel free to ask during or after
- Ideal attendee has a fair bit of experience with WordPress, knows how to install plugins, and wants to take things to the next level
Introductions around the room (depending on number of people)
- First name
- Whether or not you're running WordPress
- One problem you want to solve today
Voting on topics for today (2 votes per person)
- Plugins for publishers - 11
- Customizing or building a WordPress theme - 17
- Working in a sandbox and deploying with version control - 7
- Performance monitoring and tuning - 3
Plugins for publishers
Plugins to consider
- WordPress.com Custom CSS - Use your own CSS to tweak your website without modifying your theme’s files. Includes a revision history so you can always backtrack to prior versions.
- Co-Authors Plus - Assign multiple bylines to an article.
- W3 Total Cache - Speed up the load time of your website with caching. Caching takes a generated page of your website and stores it statically for future use.
- After the Deadline - Spelling, style, and grammar checker powered by artificial intelligence. Catches misused words, passive voice, and cliches.
- Embedly - Embed rich media from over 160 providers solely by copy and pasting the URL into the post box. Embedly fetches the embed code for you, and resizes it dynamically according to settings you specify.
- Post Author Box - Add an informational box about the author to the beginning or ending of every post (or page).
- Google Calendar Events - Parses Google Calendar feeds and displays the events as a calendar grid or list on a page, post or widget.
- JSON API - For the programatically-inclined, access all of your content through a JSON API. Useful for pulling content into your website with jQuery.
- Twitter Tools - Automatically publish your articles to Twitter, and pull in your most recent tweets into a widget area.
- Subscribe to Comments - Allow commenters to subscribe to email notifications on threads they’ve commented on. Increase enagement with your website with repeat visitors.
- Emphasis - Paragraph- and sentence-level linking and highlighting. Originally developed for nytimes.com, Michael Donohoe open-sourced the code and Ben Balter made it into a WordPress plugin. Every website should have emphasis.
- NextGEN Gallery - powerful photo gallery/organization tool. Very complex with a lot of advanced features for those who want to fine-tune their photo experience, but Wordpress also has a built-in tool that works fine and should be used for the majority of situations.
Important note: All plugins have a performance cost, some more than others. You should always keep this in mind when wanting to install a new plugin.
What you should look for when choosing a plugin
- Is it GPL/open source? Can you legally modify it if you need to fix or improve it?
- Has it been tested with your version of WordPress?
- Was it updated in the last six months?
- What's the quality of discussion in the support forum? Are there lots of bug reports?
Question: any plugins you highly recommend I'm missing from the list?
Customizing or building a WordPress theme
Question: What themes are you using currently and how do you like it?
- StudioPress - Delicious and Magazine child themes; Customizable themes (widgets you can use, CSS customization, color picking)
- Arras - Free; customized the CSS; rebuilt
- Artthemia - Hacked into sidebars
Premium themes to consider
- WooThemes - Membership fee. Large, diverse selection of WordPress themes. Gazette is a popular one amongst student newspapers.
- Graph Paper Press - Membership fee. Aesthetic themes with a strong focus on visual content.
- Press75 - Time-based membership fee. Variety of well-designed themes.
- Gabfire - Different Focus on magazine- and newspaper-style themes.
Aspects to think of when choosing a theme
- Navigation position in the header, and whether it supports WordPress’ custom menus
- Media slideshow on the homepage
- Color scheme, and whether there are alternate options available
- Homepage layout (reverse chronological blog vs. magazine vs. others)
- Author profile pages listing most recent articles with bios and pictures
- Any widgets packaged with the theme
- Different types of custom page templates
Important note: You can easily make most design, color, and font changes with CSS, so functional elements should be prioritized over design.
Question: What types of improvements are you thinking about making?
- Marvita: Adding a photo gallery/slider to the homepage
- Martin: Social networking friendly
- Isaid: Controlling the stories appearing on the homepage
Modifications you might consider making
- Custom section pages
- Author bio pages (including biography, recent posts, avatar, email address)
- Simple/print stylesheet
- Native photo galleries
- Adding custom menu support
- Additional page templates
- Adding Post Thumbnail support for featured images
- Question: Has anyone created a child theme before? Can you explain the advantages?
Things to consider after your modifications
- In what ways does it affect the load time of the page?
- Does it work in all browsers? How does the rendering change?
Working in a sandbox and deploying with version control
Question: What's a sandbox? How many people are currently using one?
- Number of people:
Why sandboxes are important
- Work on long-term projects in a private space
- Share experiments with your team before the entire world
- If your PHP doesn't work, you don't bring down the live site
- If your CSS doesn't work, it doesn't affect the experience of users visiting the live site
Workflow for a sandbox
- Scope a round of improvements to make
- Make your changes, committing early and often
- Troubleshoot JS with Firebug
- Troubleshoot PHP errors with WP_DEBUG
- Test your changes with different data and different browsers
- Deploy to production after all of the bugs have been worked out
- Do it again
Ways to move code from your sandbox to production
- Terrible: copy and pasting from one file to another
- Mediocre: creating a zip file of your current theme version, and using that to replace the production version
- Much better: version control (Git, Subversion or other)
Question: What is version control? How many people are currently using it?
- Number of people:
Two popular types of version control
- Git - Distributed version control developed by Linus Torvald for the Linux project. A little more complex, but much better in many aspects. GitHub is a popular website for hosting Git repositories
- Subversion - Everyone checks out of a single master repository. WordPress.org uses this.
Demo: Editing and committing code
Tip: Commit early and commit often
- Helps others track changes to the code base
- Helps you track down the bad commit when some part of your code stops working
- Set up a sandbox for experimentation and to take the stress away when making changes
- Experiment with version control for theme and plugin development
- Check all of your WordPress code and plugins out of the WordPress.org repository (makes updating easier)
Performance monitoring and tuning
Question: What is performance, is it important and, if so, why?
Types of performance
- Backend - How quickly the server returns a response to the request. The number of sites running on the server (if you're on shared hosting) and plugins you have installed can affect this.
Plugins to help with performance
- WP Super Cache - Generates static HTML files for 99% of visitors with few different ways to serve them.
- W3 Total Cache - More advanced WordPress plugin with various types of caching if your server configuration supports it.
- Pingdom (free and paid) - Regular checks to see if your site is up and returning a valid response. Can search for a string on the page to see if response is valid.
- Firebug/YSlow (free) - Multi-purpose Firefox extension
- New Relic (free and paid) - Server-level application monitoring tool to track response time of WordPress, database queries and more (example story)
- Set up a site monitoring tool to track uptime. Depending on your web host, they might help monitor as well.
- Test the speed of your website with Firebug/YSlow. Consider a few different pages to get a useful sample.
- Install WP Total Cache or W3 Total Cache. Test the speed of your website while logged out before and after. Note the difference (if any).
Question and Answer
Giving users more power in controlling copy
What to do when a plugin breaks