Professional WordPress

Paperback
from $0.00

Author: Hal Stern

ISBN-10: 0470560541

ISBN-13: 9780470560549

Category: Blogging

An in-depth look at the internals of the WordPress system. As the most popular blogging and content management platform available today, WordPress is a powerful tool. This exciting book goes beyond the basics and delves into the heart of the WordPress system, offering overviews of the functional aspects of WordPress as well as plug-in and theme development.\ What is covered in this book?\ \ WordPress as a Content Management System\ Hosting Options\ Installing WordPress Files\ Database...

Search in google:

Explore the power and possibilities of WordPress from the inside out As the most popular self-hosted blogging software in use today, WordPress is remarkably simple to operate and can be extended and tailored for a wide variety of applications. This guide focuses on the internal structure and flow of the core code, as well as the data model on which that code operates, so that you can harness the power of WordPress to meet your specific needs. The author team pulls together developer and deployer expertise, as well as knowledge of popular open source plugins, themes, and tools for WordPress, to provide an in-depth guide suitable for all WordPress users, from self-hosted bloggers to enterprise content management system applications. Professional WordPress: Offers an overview of the WordPress system and describes what happens when a WordPress-generated web page is displayed Discusses the core of WordPress, describing internal code flow and data structures Demonstrates extending WordPress through plugins and customizing it via themes Combines a developer view of user experience and optimization with the deployer requirements for performance, security, and measurement Provides practical examples of integrating WordPress with enterprise and social networking tools Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job. wrox.com Programmer ForumsJoin our Programmer to Programmer forums to ask and answer programming questions about this book, join discussions on the hottest topics in the industry, and connect with fellow programmers from around the world. Code DownloadsTake advantage of free code samples from this book, as well as code samples from hundreds of other books, all ready to use. Read MoreFind articles, ebooks, sample chapters and tables of contents for hundreds of books, and more reference resources on programming topics that matter to you.

Professional WordPress\ \ By Hal Stern David Damstra Brad Williams \ John Wiley & Sons\ Copyright © 2010 John Wiley & Sons, Ltd\ All right reserved.\ ISBN: 978-0-470-56054-9 \ \ \ Chapter One\ First Post\ WHAT'S IN THIS CHAPTER?\ * Appreciating the provenance of the WordPress platform * Choosing a suitable platform for your WordPress installation * Downloading, installing, and performing basic configuration of WordPress * Diagnosing and resolving common installation problems\ If displaying "Hello World" on an appropriate device defines minimum competence in a programming language, generating your first post is the equivalent in the blogging world. This chapter provides a brief history of WordPress and then explores several options for hosting a WordPress installation. Common miscues and misperceptions along with their resolutions round out the chapter and put you on the edge of publishing your wit and wisdom.\ Once you've installed, configured, and completed the bare-bones administration, you're ready to take advantage of the code walkthroughs and detailed component descriptions in later chapters. Of course, if you already have a functional WordPress blog, you can skip this chapter and dive head-first into the Dashboard control wonderland in Chapter 2, "Functional Overview."\ WHAT IS WORDPRESS?\ WordPress is one of the most popular open source blogging systems available, with global and vibrant user, developer, and support communities. Though it can be compared to TypePad, Moveable Type, Google's Blogger, and the Apache Roller project as a user-generated content workhorse, WordPress distinguishes itself with a broad array of hosting options, functional extensions (plugins), and aesthetic designs and elements (themes).\ With the rise of self-publishing, low-cost web hosting and freely available core components like the MySQL database, blogging software followed the same trend as most other digital technologies, moving from high-end, high-cost products to widely available, low-cost consumer or "hobbyist" systems. WordPress isn't simply about creating a blog so that you can have a digital diary attached to your vanity URL; it has evolved into a full-fledged content management system used by individuals and enterprises alike. This section takes a brief tour through the early history of WordPress and brings you up to speed on the current release and user community.\ A Short History: WordPress and Friends\ WordPress started similarly to many other popular open source software packages: Some talented developers saw a need to create a powerful, simple tool based on an existing project licensed under the GPL. Michel Valdrighi's b2/cafelog system provided the starting point, and WordPress was built as a fork of that base by developers Matt Mullenweg and Mike Little. WordPress first appeared in 2003, also built on the MySQL open source database for persisting content and PHP as the development platform. Valdrighi remains a contributor to the project, which thrives and depends on a growing and interested community of users and developers.\ As with other systems written in PHP, it is self-contained in the sense that installation, configuration, operation, and administration tasks are all contained in PHP modules. WordPress's popularity has been driven in part by its simplicity, with the phrase "five minute installation" making appearances in nearly every description or book about WordPress. Beyond getting to a first post, WordPress was designed to be extended.\ WordPress today is supported by a handful of core developers and just under 100 key contributors. Mike Little today runs the WordPress specialty shop zed1.com and he contributes the occasional patch to the code. Matt Mullenweg's company, Automattic, continues to operate the wordpress.com hosting service as well as fund development of related content management tools: WordPress MU, a multi-user version of WordPress that is at the heart of the wordpress.com hosting system. Pronounce it "em-you" or take the rather scholarly "myu" approach if you want to impress your Greek or mathematically inclined friends. Gravatar dynamically serves images tied to e-mail addresses, providing a hosted icon with a variety of display options. Think of it as a service to make hot-linking your profile picture technically and socially acceptable.\ As a content management system, the WordPress system definition doesn't stop at time-serialized posts with comments. BuddyPress is a set of themes and plugins that extends WordPress into a functional social networking platform, allowing registered users to message and interact with each other, again with all content managed within the WordPress framework. Similarly, bbPress is a PHP- and MySQL-based system designed for forums (bulletin boards) that is distinct from WordPress but is commonly integrated with it.\ We cover some of these WordPress adjunct systems in more detail in Chapter 15, "The WordPress Developer Community," but they're included here to provide a sense of how WordPress has expanded beyond a basic single-user-oriented tool. At the same time, we're not endorsing or making a commercial for Automattic, but delving into the guts of WordPress without a spin of the propeller hat toward Mullenweg and Little is somewhere between incorrigible and bad community behavior.\ Current State\ This book is based on the WordPress 2.9 major release. Each successive release of WordPress has included improvements in the administration and control functions (Dashboard), backup, export, and import functions, and installation and upgrade features. Even if you start with a slightly down-rev version of WordPress, you'll be able to bring it up to the current release and maintain the freshness of your install. We touch on install and upgrade paths later in this chapter.\ Exactly how popular and prevalent is WordPress usage? "Popular" is always a subjective metric, but statistics add some weight to those perceptions. Jason Calacanis claimed 202 million websites using WordPress in Episode 16 of "This Week in Startups" (September 2009). That includes sites using WordPress for content management, blogging, and personal rants, and has to be discounted by those of us who have multiple WordPress installations to their names, but even with that order of magnitude estimate, WordPress is immensely popular.\ Here are download statistics for the core WordPress system:\ * 2006: 1.5 million (source: WordPress.org)\ * 2007: 3.8 million (source: WordPress.org)\ * 2008: More than 11 million (source: Matt Mullenweg's WordCamp NYC keynote)\ Hosted blogs on wordpress.com now number over 4.6 million, with more than 35 million posts over the 2008 calendar year, reaching a run rate of about 4 million posts per month; again those statistics are courtesy of Mullenweg's WordCamp NYC keynote (available on WordCampTV for your viewing pleasure). The plugin population went from about 370 in 2006, to 1,384 in 2007, with more than 6,300 currently registered as reported on WordPress.org. The combinations of plugins and themes require scientific notation to represent in complexity, but at the same time, they're all equally simple to locate, integrate, and use. That's the result of a solid architecture and an equally solid community using it.\ Today, WordPress powers CNN's blogs, the Wall Street Journal's All Things D, and the irreverent but snowclone-driven icanhazcheeseburger.com. (If you looked for a backstory on "snowclone," apologies, but that's also the joy of discovering new facts in a culture of participatory media).\ Where do you get started?\ wordpress.org is the home for the current released and in-development versions of the code. Click down to wordpress.org/extend for a starting point in finding plugins, themes, and wish lists of ideas and features to be implemented.\ wordpress.com has both free and paid hosting services. Over at wordpress.org/hosting you'll find a list of hosting providers that support WordPress and often include some additional first-time installation and configuration support in their packaging of the code for delivery as part of their hosting services.\ Intersecting the Community\ WordPress thrives and grows based on community contributions in addition to sheer usage. Like high school gym class, participation is the name of the game, and several semi-formal avenues along which to channel your efforts and energies are available.\ WordCamp events are community-hosted, locally operated, and now happen in dozens of cities around the world. Camps that reach critical mass are listed on wordcamp.org, but you'll do just as well to search for a WordCamp event in a major city close to you. WordCamps occur nearly every weekend with bloggers, photographers, writers, editors, developers, and designers of all experience and skill levels counted among their attendees. WordCamps are a low-cost introduction to the local community and often a good opportunity to meet WordPress celebrities.\ Less structured but more frequently convened than WordCamps are WordPress Meetups, comprising local users and developers in more than 40 cities. You'll need a meetup.com account, but once you're registered you can check on locations and timetables at wordpress.meetup.com to see when and where people are talking about content management.\ A rich, multi-language documentation repository is hosted at codex.wordpress.org. The WordPress Codex, with all due respect to the term reserved for ancient handwritten manuscripts, represents the community-contributed tips and tricks for every facet of WordPress from installation to debugging. It's a wiki with fourteen administrators and well over 70,000 registered users. If you feel the urge to contribute to the WordPress documentation, register and write away in the WordPress Codex. We hope you'll find this book a cross between a companion and a travel guide to the Codex.\ Finally, mailing lists (and their archives) exist for various WordPress contributors and communities. A current roster is available online at codex.wordpress.org/Mailing_Lists; of particular interest may be the wp-docs list for Codex contributors and the wp-hackers list for those who work on the WordPress core and steer its future directions.\ WordPress and the GPL\ WordPress is licensed under the Gnu Public License (GPL) version 2, contained in the license.txt file that you'll find in the top-level code distribution. Most people don't read the license, and simply understand that WordPress is an open source project; however, pockets of corporate legal departments still worry about the viral component of a GPL license and its implications for additional code or content that gets added to, used with, or layered on top of the original distribution. Much of this confusion stems from liberal use of the words "free" and "copyright" in contexts where they are inappropriately applied.\ We're not lawyers, nor do we play them on the Internet or on television, and if you really want to understand the nuances of copyright law and what constitutes a "conveyance" of code, pick up some of Lawrence Lessig's or Cory Doctorow's work in those areas. We include this section to assuage IT departments who may be dissuaded from using WordPress as an enterprise content management system by overly zealous legal teams. Don't let this happen to you; again, if WordPress is acceptable to CNN and the Wall Street Journal, two companies that survive on the copyrights granted to their content, it probably fits within the legal strictures of most corporate users as well.\ The core tenet of the GPL ensures that you can always get the source code for any distribution of GPL-licensed software. If a company modifies a GPL-licensed software package and then redistributes that newer version, it has to make the source code available as well. This is the "viral" nature of GPL at work; its goal is to make sure that access to the software and its derivatives is never reduced in scope. If you plan on modifying the WordPress core and then distributing that code, you'll need to make sure your changes are covered by the GPL and that the code is available in source code form. Given that WordPress is written in PHP, an interpreted language, distributing the software and distributing the source code are effectively the same thing.\ Following are some common misperceptions and associated explanations about using WordPress in commercial situations.\ "Free software" means we can't commercialize its use. You can charge people to use your installation of WordPress, or make money from advertisements running in your blog, or use a WordPress content management platform as the foundation of an online store. That's how wordpress.com works; it also enables Google to charge advertisers for using their Linux-based services. You can find professional quality WordPress themes with non-trivial price tags, or you can pay a hosting provider hundreds or thousands of dollars a year to run your MySQL, PHP, Apache, and WordPress software stack; both involve commercialization of WordPress.\ If we customize the code to handle our own {content types, security policies, obscure navigational requirements} we'll have to publish those changes. You're only required to make the source code available for software that you distribute. If you choose to make those changes inside your company, you don't have to redistribute them. On the other hand, if you've made some improvements to the WordPress core, the entire community would benefit from them. Getting more staid employers to understand the value of community contribution and relax copyright and employee contribution rules is sometimes a bit challenging, but the fact that you had a solid starting point is proof that other employers made precisely that set of choices on behalf of the greater WordPress community.\ The GPL will "infect" content that we put into WordPress. Content - including graphical elements of themes, posts, and pages managed by WordPress - is separated out from the WordPress core. It's managed by the software, but not a derivative of or part of the software. Themes, however, are a derivative of the WordPress code and therefore also fall under the GPL, requiring you to make the source code for the theme available. Note that you can still charge for the theme if you want to make it commercially available. Again, the key point here is that you make the source code available to anyone who uses the software. If you're going to charge for the use of a theme, you need to make the source code available under the GPL as well, but as pointed out previously, users installing the theme effectively get the source code.\ More important than a WordPress history lesson and licensing examination are the issues of what you can do with WordPress and why you'd want to enjoy its robustness. The next section looks at WordPress as a full-fledged content management system, rather than simply a blog editing tool.\ CONTENT AND CONVERSATION\ Multiple linear feet of shelves in bookstores are filled with volumes that will improve your writing voice, literary style, blogging techniques, and other aspects of your content creation abilities. One of our goals for this book is define the visual, stylistic, and context management mechanisms you can build with WordPress to shape vibrant user communities around your content. That context stimulates conversation with your readers. It's not just about the words in each post, or even if you're an interesting writer. How will people find you? How will you stand out in the crowd? How do you put your own imprint on your site, and personalize it for whatever purpose: personal, enterprise, community, or commercially measured?\ WordPress as a Content Management System\ Blogging systems have their roots in simple content management operations: create a post, persist it in stable storage such as a filesystem or database, and display the formatted output based on some set of temporal or keyword criteria. As the richness and types of content presented in blog pages expanded, and the requirements for sorting, searching, selecting, and presenting content grew to include metadata and content taxonomies, the line between vanilla, single-user-targeted blogging software and enterprise-grade content management systems blurred.\ (Continues...)\ \ \ \ \ Excerpted from Professional WordPress by Hal Stern David Damstra Brad Williams Copyright © 2010 by John Wiley & Sons, Ltd. Excerpted by permission.\ All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.\ Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site. \ \

INTRODUCTION. CHAPTER 1: FIRST POST. What Is WordPress? Content and Conversation. Getting Started. Finishing Up. CHAPTER 2: FUNCTIONAL OVERVIEW. The Dashboard. Creating and Managing Content. Categorizing Your Content. Working with Media. Comments and Discussion. Working with Users. Extending WordPress. Content Tools. Configuring WordPress. CHAPTER 3: CODE OVERVIEW. Downloading. Exploring the Code. Configuring Key Files. WP-Content User Playground. CHAPTER 4: TOUR OF THE CORE. What's in the Core? Using the Core as a Reference. WordPress Codex and Resources. Don't Hack Core! CHAPTER 5: THE LOOP. Understanding the Loop. Putting the Loop in Context. Flow of the Loop. Template Tags. Customizing the Loop. Global Variables. Working Outside the Loop. CHAPTER 6: DATA MANAGEMENT. Database Schema. Table Details. Direct Database Manipulation. WordPress Taxonomy. Building Your Own Taxonomies. CHAPTER 7: PLUGIN DEVELOPMENT. Plugin Packaging. Know Your Hooks: Actions and Filters. Plugin Settings. WordPress Integration. Plugin Security. Creating a Plugin Example. Publish to the Plugin Directory. CHAPTER 8: THEME DEVELOPMENT. Why Use a Theme? Installing a Theme. What Is a Theme? Creating Your Own Theme. Creating Your Own Theme: Getting Started. Creating Your Own Theme: DRY. Creating Your Own Theme: Content Display. Creating Your Own Theme: Additional Files. Custom Page Templates. Theme Hierarchy and Child Themes. Premium Themes and Other Theme Frameworks. CHAPTER 9: CONTENT AGGREGATION. What is a Lifestream? Getting Noticed. Social Media Buttons. Simple Social Networking Badges. Collecting External Content. Pushing Content from WordPress to Other Sites. Advertising. Privacy and History. CHAPTER 10: CRAFTING A USER EXPERIENCE. User Experience Principles. Usability and Usability Testing. Structuring Your Information. Getting Your Site Found. How Web Standards Get Your Data Discovered. Searching Your Own Site. Mobile Access. CHAPTER 11: STATISTICS, SCALABILITY, SECURITY, AND SPAM. Statistics Counters. Cache Management. Load Balancing Your WordPress Site. Dealing With Spam. Securing Your WordPress Site. Using WordPress Roles. CHAPTER 12: WORDPRESS AS A CONTENT MANAGEMENT SYSTEM 299 Defining Content Management. Workflow and Delegation. Content Organization. Interactivity Features. Other Content Management Systems. CHAPTER 13: WORDPRESS IN THE ENTERPRISE. Is WordPress Right for Your Enterprise? When WordPress Isn’t Right for You. Scalability. Integration with Enterprise Identity Management. Content Integration via Feeds. CHAPTER 14: MIGRATING TO WORDPRESS. Planning a Migration. Content Identification. Media Migration. Moving Metadata. Moving Authors and Users. Theme and Presentation. Unique Functionality. Cleaning Up. Launching. CHAPTER 15: WORDPRESS DEVELOPER COMMUNITY. Contributing to WordPress. Sister Projects. Resources. INDEX.