- Content & Conversation from wordpress
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.
Content management systems (CMS) handle the creation, storage, retrieval, description or annotation, and publication or display of a variety of content types. CMS also covers workflow tasks, typically from an editorial or publishing perspective, but equally including actions such as approval and marking content for additional editing or review.
WordPress isn’t the only open source content management system in widespread use today; the Drupal and Joomla projects are equally popular choices. Drupal and Joomla start from the perspective of managing content repositories; they handle a variety of content types, multiple authors in multiple roles, and getting the content to a consumer that requests it. WordPress is at its heart a blogging system, and the end focus is on displaying content to a reader.
WordPress has established itself as a bona fide content management system through its design for extensibility and the separation of content persistence from content display. Taking some liberties with the Model-View-Controller design pattern, WordPress separates the MySQL persistence layer as a data model, the theme-driven user interface and display functions, and the plugin architecture that interposes functionality into the data to presentation flow. Most important, WordPress stores content in raw form, as input by the user or an application posting through the WordPress APIs. Content is not formatted, run through templates, or laid out until the page is rendered, yielding immense power to the functions that generate the actual HTML. At the same time, the data model used by WordPress uses a rich set of tables to manage categories (taxonomies), content tags (folksonomies), author information, comments, and other pieces of cross-reference value.
Although that design gives WordPress incredible power and flexibility as a content management system, it also requires knowledge of how those data persistence and control flows are related (it was a search for such a dissection of WordPress in functional terms that got us together to write this book).
- Wordpress Getting Started
Before any serious work on presentation, style, or content begins, you need a home for your blog (despite the previous discussion about WordPress and content management systems, we'll refer to your blog and the actual WordPress installation that implements it interchangeably, mostly for convenience and brevity). Factors affecting your choice include:
- Cost: Free hosting services limit your options as a developer, and frequently preclude you
from generating money from advertising services. More expensive offerings may include better
support, higher storage or bandwidth limits, or multiple database instances for additional
applications. - Control:What tools are provided for you to manage your MySQL database, files comprising
the WordPress installation, and other content types? If you want to be able to muck around
at the SQL level, or manage MySQL through a command-line interface, you should ensure
your hosting provider supports those interfaces. - Complexity: You can install the Apache web server with a PHP interpreter, MySQL, and the WordPress distribution yourself, but most hosting providers have wrapped up the installation process so that some of the rough edges are hidden from view. If you expect to need technical support on the underlying operating system platform, find a provider (including your own IT department) that provides that support in a reasonable time frame.
This section takes a quick look at some hosting options, walks through the basics of a do-it-yourself installation, and concludes with an overview of the ways in which WordPress and MySQL choose to ignore each other when installation goes into the weeds.
- Wordpress Hosting Options
Three broad categories of WordPress hosting exist, each with trade-offs between administrative complexity
and depth of control. The easiest and most popular is to use wordpress.com, a free hosting service run by Automattic using WordPress MU. You can install themes and plugins through the Dashboard but you can only enable or disable the choices pre-installed for you. Further, you won't have access to the underlying MySQL databases, core code, or be able to integrate WordPress with other systems. You can redirect one of your own URLs to wordpress.com, but if you want full control over everything from the code to the URLs used, you’re probably looking at a paid option. For our readers, the free route may be a reasonable first step, but we’re assuming you’re going to want to perform surgery on your installation. You’ll find a starter list of for-fee hosting providers on WordPress.org, including the paid option on wordpress.com. Most have the latest, or close to latest, releases of the WordPress core available as a package to be installed in conjunction with MySQL and a web server. The third hosting option is to install everything on servers that you own and operate. If your servers live in a hosting facility but you enjoy root administrative access, that’s equivalent to a do-it-yourself installation.
and depth of control. The easiest and most popular is to use wordpress.com, a free hosting service run by Automattic using WordPress MU. You can install themes and plugins through the Dashboard but you can only enable or disable the choices pre-installed for you. Further, you won't have access to the underlying MySQL databases, core code, or be able to integrate WordPress with other systems. You can redirect one of your own URLs to wordpress.com, but if you want full control over everything from the code to the URLs used, you’re probably looking at a paid option. For our readers, the free route may be a reasonable first step, but we’re assuming you’re going to want to perform surgery on your installation. You’ll find a starter list of for-fee hosting providers on WordPress.org, including the paid option on wordpress.com. Most have the latest, or close to latest, releases of the WordPress core available as a package to be installed in conjunction with MySQL and a web server. The third hosting option is to install everything on servers that you own and operate. If your servers live in a hosting facility but you enjoy root administrative access, that’s equivalent to a do-it-yourself installation.
WordPress requires a web server with PHP support, a URL rewriting facility, and an instance of MySQL. Apache is the most popular option for front-ending WordPress because it provides PHP interpretation through mod_php and URL rewriting in mod_rewrite. There is growing interest in lighttpd (Lighty) as a replacement for Apache, although the URL rewriting functionality needs a bit of handholding. Finally, you can use Microsoft’s IIS 7.0 as a web server with its URL_rewrite module.The emphasis on URL rewriting stems from WordPress’s support for ‘‘pretty’’ permalinks to blog entries, allowing you to create a URL tree organized by date, category, tag, or other metadata. Those mnemonic or readable URLs are mapped into MySQL database indices for the corresponding pages using the .htaccess file (in Apache parlance). It’s a case of dynamic content generation, this time starting from the user path to the page in question, and relying heavily on your web server's muscle to map public neatness into internal structure. Technically, URL rewriting isn’t required to install WordPress, but it's good to have because it gives you tremendous flexibility in the presentation and naming conventions used for your content’s URLs.
Up to this point we’ve mentioned MySQL in passing, but a brief review of MySQL requirements rounds out the hosting prerequisite list. It’s worth establishing some terminology and distinguishing between the MySQL software, database instances, and WordPress instances using MySQL. When you install and configure MySQL, you have a full-fledged relational database system up and running. It doesn’t have to be configured on the same machine as your web server, and some hosting providers will create horizontally scalable MySQL ‘‘farms’’ in parallel to their web server front ends. An instance of MySQL running on a server can support multiple databases, each with a unique name. When you install Word-Press, you’ll need to know the name of the MySQL database reserved for your content, although this information may be auto-generated and configured for you if you’re using a provider that supports WordPress and MySQL as an integrated package. WordPress creates a number of relational data tables in that named database for each blog that you create.
Confusion results from nomenclature and complexity. You (or your hosting provider) may run multiple MySQL instances on multiple servers, and you’ll need to know where your database is hosted. Because each instance of MySQL can run multiple databases, and each database contains groups of tables, it’s possible to run multiple MySQL based applications on the same hosting platform, using one MySQL instance or even one MySQL database.
If you want to have multiple WordPress blogs on the same server, you can share a single MySQL database instance for all of them provided you configure WordPress to distinguish the MySQL database table names within the MySQL database. It’s a simple configuration option that we cover in the next section, and it highlights the distinction between multiple sets of tables in a database and multiple databases for distinct applications.
Once you’ve secured the necessary foundation, it’s time to get the code up and running. Even if you’re using a hosting provider that installs MySQL and WordPress for you, it’s worth knowing how the server-side components interact in case you need to track down a problem when you’re deep in plugin development.
Please Comment Here