Smashing WordPress (eBook)
368 Seiten
Wiley (Verlag)
978-1-118-60074-0 (ISBN)
The ultimate guide to using WordPress to make your life easier
This newest edition from the world's most popular resource for web designers and developers presents you with nothing less than the latest and greatest on everything that WordPress has to offer. As one of the hottest tools on the web today for creating a blog, WordPress has evolved to be much more than just a blogging platform and has been pushed beyond its original purpose. With this new edition of a perennially popular WordPress resource, Smashing Magazine offers you the information you need so you can maximize the potential and power of WordPress. Takes you through the anatomy of a WordPress installation and shows you how WordPress actually works behind the scenesWalks you through custom post types and details how they work, what they can be used for, and how you can make them appear in your regular content flowExplains how to build beautiful and unique WordPress themes and creating amazing navigationGuides you through building plugins, integrating theme options, creating custom login forms and admin themes, and using the Loop to control contentZeroes in on building a WordPress project for SEO and highlights integrating WordPress with the social web
Smashing WordPress: Beyond the Blog, Fourth Edition shows you how to take WordPress further than just an ordinary blog.
The ultimate guide to using WordPress to make your life easier WordPress guru Thord Daniel Hedengren takes you beyond the blog to give you the tools and know-how needed to build just about anything in WordPress. You ll discover how to use WordPress as a CMS to power fully-fledged websites, photo galleries, forums, eCommerce sites, and much more. You get step-by step instructions on developing model sites from the ground up and how to utilize and build plugins that let you take WordPress to the next level. You will learn how to: Use custom post types and custom taxonomies Add and work with custom headers, backgrounds, and more Build gorgeous WordPress themes with the latest features Create custom login forms and admin themes Control content with the loop (and alternatives to the loop) Integrate theme options and the theme customizer Extend WordPress with widget functionality Build WordPress projects for SEO Integrate WordPress with the social web Create helpful navigation using the navigation menu Use conditional control elements Get started with your own responsive themes Updated and revised to cover the changes to WordPress 3.8, Smashing WordPress: Beyond the Blog, 4th Edition, is the ultimate guide to getting the most out of WordPress.
CHAPTER 1: THE ANATOMY OF A WORDPRESS INSTALL INSTALLING WORDPRESS IS neither difficult nor time-consuming, and the instructions available on WordPress.org are more than adequate to guide you through the basic install. With the extra knowledge that you’ll get in this chapter, however, you can supercharge your WordPress setup with themes and plugins. WordPress is the bricks and mortar of the site, but themes and plugins are what make it really tick. Remember that “WordPress” in this book refers to the standalone version of WordPress available for free from http://wordpress.org. Don’t get this mixed up with Automattic’s hosted version on http://wordpress.com. This book is all about the main version available from WordPress.org, with more specifically version 3.8 in mind. THE BASIC INSTALL Installing WordPress is a breeze; the PR talk about a “five-minute install” is right on target. In fact, the only reason that the install should take even that long is the fact that uploading the files sometimes takes time due to slow Internet connections or sluggish web hosts. Most likely, you’ll already have a fair amount of experience with basic WordPress installs, so I’ll be brief on this matter. First, make sure that your system meets the minimum requirements. The most recent set of requirements can be found at http://wordpress.org/about/requirements. If your host supports PHP 5.2.4 or higher and runs MySQL 5.0 or higher, you’ll be fine. However, you should make sure that your host has mod_rewrite installed because that will be needed for prettier links. There are two ways to install WordPress: the guided way and the manual way. A third installation method is the one-click install offered by some web hosts. One-click installs are briefly described later in this chapter. There’s also a fourth option for installing WordPress using Subversion or Git, but I’ll skip that in this book. THE GUIDED INSTALLATION METHOD WordPress is one of the easiest open source publishing systems out there to get up and running. Just download the most recent version of WordPress (from http://wordpress.org/download), extract the archive file (usually you’re grabbing a zip file), and then upload the files within the wordpress folder to the place where you want to install WordPress, using FTP. For example, if you want to install WordPress on mysite.com, you just upload the files to the root folder for mysite.com. Point your web browser to the install directory (which would be http://mysite.com in this example) and provide the requested information, as shown in Figure 1-1. You’ll need your database name, username, and password, and possibly also the address to the database server if you or your host has an external address. Your host will supply this, along with everything you need to actually set up your database. This might involve a web interface such as cPanel or phpMyAdmin or the use of SSH or your software of choice. Consult your host for more information on how you work with MySQL and set up databases. Click Submit to get to the site setup, shown in Figure 1-2. On this screen, fill out the name of the site, the admin account credentials you would like, and so on. Make sure that you use a working e-mail address and keep track of your password. After you have entered all the requested information, click the Install WordPress button. You’re just about done. Log in — and there you have it: WordPress is up and running! Figure 1-1: The install interface. Figure 1-2: Fill out the details. The guided install doesn’t provide options to make WordPress run in any language other than the default, English. If you want your installation to run in a language other than English, consult the manual install procedure detailed in the following subsection. THE MANUAL INSTALLATION METHOD For a manual install, you’ll need the following: The most recent version of WordPress (available from http://wordpress.org/download). A MySQL database as a user who has write privileges. (Ask your host if you don’t know how to set this up.) Your favorite FTP program. To install, unzip your WordPress download and upload the contents of the wordpress folder to your destination of choice on your server. Then open the wp-config-sample.php file and find the database parts where you fill out the database name and the username and password with write privileges. This is what wp-config-sample.php looks like: // ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'database_name_here'); /** MySQL database username */ define('DB_USER', 'username_here'); /** MySQL database password */ define('DB_PASSWORD', 'password_here'); /** MySQL hostname */ define('DB_HOST', 'localhost'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', ''); Next, still in wp-config-sample.php, find the section that deals with secret keys. This part starts with commented information text titled “Authentication Unique Keys” and is followed by four lines (as of this writing) where you’ll enter the secret keys. This is a security function to make your install more secure and less prone to hacking. You’ll need to add these keys only once, and although they can be entered manually and can be whatever you like, there is an online generator courtesy of WordPress.org that gives you random strings with each load. Just copy the link (https://api.wordpress.org/secret-key/1.1/salt) to the generator from your wp-config-sample.php file and open it in your favorite web browser. You’ll get a page containing code looking something like Figure 1-3. Figure 1-3: Your random key, ready to be copied and pasted. Copy the contents from the generator page and replace the following code in wp-config-sample.php with them: define('AUTH_KEY', 'put your unique phrase here'); define('SECURE_AUTH_KEY', 'put your unique phrase here'); define('LOGGED_IN_KEY', 'put your unique phrase here'); define('NONCE_KEY', 'put your unique phrase here'); define('AUTH_SALT', 'put your unique phrase here'); define('SECURE_AUTH_SALT', 'put your unique phrase here'); define('LOGGED_IN_SALT', 'put your unique phrase here'); define('NONCE_SALT', 'put your unique phrase here'); By replacing the code with the lines from the generated page, you’ve made your install a little bit more secure from those nasty hackers. The last thing you may want to change in wp-config-sample.php is the language. WordPress is in English (U.S. English, to be exact) by default. To change the language, you’ll need to upload a language file to your wp-content/languages/ folder. The language files are in the .mo format; you can find most of them at http://codex.wordpress.org/WordPress_in_Your_Language. You also need to alter the following little snippet in wp-config-sample.php to let WordPress know what language you want: define('WPLANG', ''); You need to add the language code: This is the same as the language file, without the file extension. So if you want your install in Swedish (the language of kings), you’d download the sv_SE.mo file, upload it to wp-content/languages/, and then pass the language to WPLANG, like this: define('WPLANG', 'sv_SE'); This won’t necessarily display any themes or plugins you use in your language of choice, but WordPress and its core functionality will be, as will any code that supports it. (You’ll learn about localization of themes and plugins in Chapter 6, “Advanced Theme Usage.”) That’s it! Rename wp-config-sample.php to wp-config.php and point your web browser to your install location. You will see a link that initiates the install procedure, in which you’ll fill in the blog title and the admin user’s e-mail address and choose whether the blog should be open to search engines for indexing. (Most likely this will be the case, but if you want to fiddle with it first, disable it; you can enable it in Settings later.) After this, you’ll get an admin username, a random password (save that!), and, hopefully, a success message, along with a link to the blog. Not very complicated, right? USING AN EXTERNAL DATABASE SERVER One of the most common causes of a failed WordPress install is that the MySQL database is located on a separate server. If you’re getting database connection errors and you’re quite sure that both the username and password for the database user are correct, along with the full write capabilities, then this is most likely the problem. To fix this, just find this code snippet in...
Erscheint lt. Verlag | 14.2.2014 |
---|---|
Sprache | englisch |
Themenwelt | Informatik ► Office Programme ► Outlook |
Informatik ► Web / Internet ► Web Design / Usability | |
ISBN-10 | 1-118-60074-6 / 1118600746 |
ISBN-13 | 978-1-118-60074-0 / 9781118600740 |
Haben Sie eine Frage zum Produkt? |
Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM
Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belletristik und Sachbüchern. Der Fließtext wird dynamisch an die Display- und Schriftgröße angepasst. Auch für mobile Lesegeräte ist EPUB daher gut geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine
Geräteliste und zusätzliche Hinweise
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich