advanced wordpress
DESCRIPTION
Workshop given at Software Freedom Day 19th September 2009 in Melbourne, Australia on the free and open source WordPress blogging tool.TRANSCRIPT
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Advanced WordPress
Saturday 19 Sep 09Software Freedom Day
Melbourne
Kathy [email protected]
http://blog.kathyreid.id.auhttp://slideshare.net/KathyReid
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
This workshop is for YOU
Let me know if there's something
you would like covered in more depthor in a different way
If it's too technical, let me know
If it's not technical enough, let me know
Slide 3
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
What does this workshop assume?
● You are comfortable with creating posts and pages
● You are comfortable installing and changing themes, widgets and plugins
● Have used WordPress.com online or have installed your own WordPress on your server
● Installation page on Codex:http://codex.wordpress.org/Getting_Started_with_WordPress#Installation
Slide 4
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Common installation issues - permissions
● wp-config.php has to be writable by the web server. This is the file that you enter your DB username and password details into
● Permissions can usually be changed via FTP
● Is everyone familiar with Linux file system permissions?
Slide 5
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Common installation issues - DB
● MySQL database has to be created, and the MySQL user has to be given permissions to the database
● This is best done through PhpMyAdmin (available through most hosting control panels)
● If MySQL is upgraded on your host, you may need to recreate the user and permissions
Slide 6
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Common installation issues - upgrades
● Since WordPress 2.7, there are tools that automate the process of upgrading
● Disable all plugins before upgrading
● Ensure you make a backup of your database
● This can also be done in PhpMyAdmin
● Everyone familiar with PhpMyAdmin?
Slide 7
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Common installation issues - timeout
● By default, WordPress has a timeout set to 30 seconds when downloading from FTP to do an automatic update
● This can result in an error like;
Downloading update from http://wordpress.org/wordpress2.7.1.zipDownload failed.: Operation timed out after 30000 milliseconds with 351500 bytes received Installation Failed
Slide 8
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Timeout (cont'd)
● You need to do the following to fix this error
● In the file system where WordPress is installed, find the file called 'file.php'
● /wpadmin/includes/
● Find the line;$response = wp_remote_get($url, array(’timeout’ => 30));
● Change the '30' to something like '500' and try the upgrade again
Slide 9
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Themes – modifying or building your own
● Easier to modify an existing theme as the basic layout will already have been done for you
● (check licensing of theme)● Modifying or building your
own themes requires some knowledge of HTML and CSS
● Themes intro page on Codexhttp://codex.wordpress.org/Using_Themes
Slide 10
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Themes – File hierarchy
● When building themes, it is important to have an understanding of the file hierarchy – ie which 'pieces' of the theme get included where. This page on the WordPress codex covers this;
● http://codex.wordpress.org/Stepping_Into_Templates
Slide 11
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Themes – styles.css
● This is the main file that needs to be edited
● The first block is used by WordPress to show style information in the Appearance menu in the Dashboard
● You will need CSS skills to edit the Theme
● http://www.cssreference.com
Slide 12
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Themes – Getting new ones
● There are literally tens of thousands of themes. High quality themes usually have;– Widget support– 'Fluid layouts' that fit to
screen– Are standards compliant– Well tested or many installs
● Good place to start is:● http://wordpress.org/extend/themes/
Slide 13
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Exercise 1 – Modifying an existing theme
● Create a copy of one of the themes in the 'wp-content/themes' directory
● Edit the styles.css file so that the first block of information is changed
● Make some changes to the colours or CSS styling within the file
Slide 14
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Exercise 1 - contd
● Navigate to 'Appearance' in your Dashboard and change the chosen theme to the one you modified.
● Can you see the differences?● What else would you like to
change about your theme?
Slide 15
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Installing plugins
● A plugin is a piece of code written in PHP by a developer which can be added to WordPress to provide additional functionality
● The quality of plugins and their maturity varies – some are excellent, some are rubbish
● Most are usually free, some are not.
Slide 16
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Finding plugins
● The best place to start is:● http://wordpress.org/extend/plugins/● Each plugin has information
on – Version– Compatibility– Author– Home page– Screenshots– Documentation
Slide 17
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Assessing a plugin
● What rating does it have?● How comprehensive is the
documentation or website?● What version is the plugin
(usually higher version, more mature)
● How active is the development (last version date)
● How many other people have it installed (a good indicator of quality)
Slide 18
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Exercise 2: Assessing and installing a plugin
● In your Dashboard, navigate to Plugins -> Add New
● You will be presented with a field where you can search for plugins. Try the keyword for a plugin you're interested in. In this example, we'll use 'twitter' (it's not case sensitive)
● WordPress will go and search all the plugins that match this keyword and present them to you in a table
19
Slide 20
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Exercise 2: Assessing and installing a plugin
● Identify the plugin you wish to install (refer to 'assessing a plugin' earlier in this presentation)
● Click the 'install' link next to the plugin
● The plugin will install automatically
● You may have to configure options for the plugin
Slide 21
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Plugins – you MUST have
● Akismet is an anti-spam plugin; it is packaged by default with WordPress. It will identify which comments are spam and which are legitimate with a high rate of accuracy.
● http://wordpress.org/extend/plugins/akismet/
Slide 22
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Plugins - Forms
● Cforms is a plugin which provides a very robust and complete method to create forms for your website.
● It is overkill for basic contact forms, but has a lot of functionality such as captcha control and auto replies
● http://www.deliciousdays.com/cforms-plugin
Slide 23
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Other plugins you might like
● Sociable: Allows people to read your posts and flag them with tools such as Delicious, Digg, Twitter etc
● Similar posts: Automatically suggest posts your readers may also like from keywords and categories
● WordPress mobile edition: Make sure your blog is readable on mobile devices
Slide 24
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Keeping plugins updated
● It's important that you keep an eye out for plugins that need to be updated – for bugs and vulnerabilities but also for enhancements.
● WordPress automatically notifies you of plugins that have updates available;
Slide 25
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Keeping plugins updated
● It's important that you keep an eye out for plugins that need to be updated – for bugs and vulnerabilities but also for enhancements.
● WordPress automatically notifies you of plugins that have updates available;
Slide 26
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Writing your own plugin
● You will need to know PHP reasonably well
● Helps to have a knowledge of the WordPress code and components – and 'hooks' that are built in for plugin developers
● Has someone else already written the plugin
● How will you support it?● http://codex.wordpress.org/Writing_a_Plugin
Slide 27
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Roles
● Roles and permissions in WordPress are basic; it is designed to be a blog used by a single person
● Blog owner can assign a role to a user which restricts what abilities that user has on the site – each role has different capabilities
● http://codex.wordpress.org/Roles_and_Capabilities#Roles
Slide 28
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
WordPress Multi User (WPMU)
● WPMU is a different form of WordPress that is designed to be installed in a multi-blogging environment
● For instance, you can run hundreds of blogs from one installation
● The administrator can set privilege levels and plugins site wide or on certain sites only
● http://mu.wordpress.org
Slide 29
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Social networking: BuddyPress
● BuddyPress aims to add social networking functionality to WordPress to make it more suitable for community sites
● Still in its infancy; is quite immature – but one to watch
● http://buddypress.org
Slide 30
Kathy [email protected]://blog.kathyreid.id.auhttp://www.slideshare.net/KathyReid
Additional resources
FLOSS Manual(Free/Libre and Open Source
Software)http://en.flossmanuals.net/wordpress
WordPress – downloads, docs, themes
http://www.wordpress.org