Installing and Configuring WordPress - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

Installing and Configuring WordPress

Description:

Installing and Configuring WordPress Richard Boakes rjb_at_boakes.org Introduction A talk based on experiences A view from orbit with zoom where necessary A necessarily ... – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 36
Provided by: rich197
Category:

less

Transcript and Presenter's Notes

Title: Installing and Configuring WordPress


1
Installing and Configuring WordPress
  • Richard Boakes
  • rjb_at_boakes.org

2
Introduction
  • A talk based on experiences
  • A view from orbit
  • with zoom where necessary
  • A necessarily incomplete view
  • covering just the bits I use
  • avoiding the obvious
  • An invitation
  • to get involved

3
Introduction (You)
  • You are
  • a) Poised to install this second
  • b) Planning on installing soon
  • c) Might install one day
  • d) Just vaguely interested
  • e) Catching up on email

4
Agenda
  • Key Features
  • Reasons to use WP
  • Installing WordPress
  • Pre-Requisites
  • Getting the code
  • The Famous 5-minute Install
  • Updating WordPress
  • Content Backups
  • Extending WordPress
  • Finding and Using Plugins
  • Particularly Useful Plugins
  • Creating and Extending Plugins
  • Closing thoughts
  • Integrating with WordPress
  • The Future of WordPress

5
Key Features
  • An editor
  • For weblog articles
  • For static pages.
  • Runs on many common hardware OS combinations.
  • Win32/64, Linux, Solaris
  • Adheres to open standards
  • e.g. XHTML, RSS, ATOM, CSS, XML-RPC.
  • Sound program architecture.
  • Easy to maintain.
  • Easy to adapt.
  • Easy to extend.
  • Handles all visitor interaction
  • Including comments, trackbacks pingbacks.
  • Sanitized and Salted.
  • Robust anti-spam solutions.
  • Over 3 yrs 300,000 spams.
  • None were published.
  • Export and Import mechanisms
  • Easy to backup and restore.
  • Easy to move your data if you dont get on with
    it.

6
Installing WordPress
7
Pre-Requisites
  • Required
  • Web Server Apache v2
  • with rewrite module enabled
  • PHP v4.3
  • MySQL v4.0
  • Optional
  • a subversion client

8
Decide where you are working
  • Work on the server, over SSH
  • Great when hacking about setting up.
  • Only mildly scary on a live service
  • Take temp copies for safety
  • Work on a client
  • Great if its a private or local site
  • For servers
  • Manually upload using sftp, etc.
  • Use sync tool

9
Locate your httpd.conf
  • Windows
  • C\Program Files\Apache Group\Apache2\conf
  • Linux
  • /etc/apache2/httpd.conf
  • Mac OS X
  • /etc/apache2/httpd.conf

10
Remember your DocumentRoot
  • DocumentRoot is defined in httpd.conf
  • common values are
  • /home/www/yourserver/htdocs
  • /Library/WebServer/Documents
  • Youll need it later

11
Configure httpd.conf
  • Enable PHP (Win)
  • LoadModule php5_module
  • "C/Program Files/PHP/php5apache2.dll
  • Enable PHP (Linux)
  • LoadModule php5_module libexec/apache2/libphp5.so
  • Enable PHP index pages
  • DirectoryIndex index.php index.html

12
Configure httpd.conf
  • Allow .htaccess override
  • ltDirectory /gt
  • Options FollowSymLinks
  • AllowOverride All
  • Order deny,allow
  • Deny from all
  • lt/Directorygt

13
Configure PHP
  • On Windows
  • The MSI does everything for you
  • you need to specify the MySQL extension
  • On Mac OS X
  • An extra step is sometimes needed
  • cp /etc/php.ini.default /etc/php.ini
  • sudo chmod w /etc/php.ini
  • sudo /usr/sbin/apachectl restart
  • On linux
  • ??? (lets see what breaks)

14
Locate your MySQL
  • Windows
  • C\Program Files\MySQL\MySQL Server 5.0\bin\
  • Linux (apt-get)
  • /usr/bin/
  • Mac OS X
  • /usr/local/mysql-5.1.32-osx10.5-x86/bin/
  • Got root? find it with
  • sudo find / name mysql

15
Configure MySQL
  • Login to mysql
  • mysql -u adminusername -p
  • Enter password
  • Create a database for wordpress to use
  • mysqlgt CREATE DATABASE mydbname
  • Query OK, 1 row affected (0.00 sec)

16
Configure MySQL
  • Create a DB user for WordPress
  • mysqlgt GRANT ALL PRIVILEGES
  • ON mydbname.
  • TO myusername"_at_myhostname
  • IDENTIFIED BY mypassword"
  • Query OK, 0 rows affected (0.00 sec)
  • Force the changes through
  • mysqlgt FLUSH PRIVILEGES
  • Query OK, 0 rows affected (0.01 sec)
  • mysqlgt EXIT

17
Get the code
  • either
  • download the code from http//wordpress.org/downlo
    ad/
  • unpack it to your DocumentRoot
  • or
  • Navigate to your DocumentRoot, and
  • svn co http//svn.automattic.com/
  • wordpress/tags/2.7.1 wordpress

18
Configure WordPress
  • Copy the sample config file
  • cp wp-config-sample.php wp-config.php
  • Edit your new config file
  • define('DB_NAME', mydbname')
  • define('DB_USER', myusername')
  • define('DB_PASSWORD', mypassword')
  • define('DB_HOST', myhostname')
  • and make up 4 random auth keys

19
The moment of truth
  • Visit
  • http//yourserver/wordpress/

20
Congratulations!
  • You up and running (hopefully)
  • but
  • Vulnerabilities arise
  • so update regularly.
  • Things go wrong
  • so make backups

21
Updating WordPress!
  • When an update is released
  • either
  • download the code
  • unpack it
  • copy it into your existing folder
  • or
  • Use subversion to switch to the latest stable
    tagged build
  • i.e. svn switch http//svn.wordpress.org/the/tagge
    d/version

22
Content Backups
  • Use mysqldump to backup
  • mysqldump.exe
  • -uroot ppassword
  • --all-databases gtc\backup.sql
  • And recover using mysql
  • mysql.exe -uroot ppassword ltc\backup.sql
  • Or use a plugin

23
Extending WordPress
24
Admin Screen
  • http//yourserver/wordpress/wp-admin

25
Pretty Permalinks
  • Default URLs are not descriptive
  • http//example.com/?p1
  • Pretty Permalinks are better
  • http//example.com/helloworld
  • Open the Settings/Permalinks
  • Select Custom Structure
  • Enter /postname
  • Save changes

26
Quick notes on publishing
  • Adding content
  • Adding tags
  • Editing a published article
  • Renaming a published article

27
Widgets
  • Add handy things to your pages
  • In the admin interface
  • Open Appearance / Widgets
  • Add widget plugins for more capabilities
  • e.g. Twitter

28
Finding and Using Plugins
  • How to find
  • http//wordpress.org/extend/plugins
  • Search Engines
  • How to install
  • Web
  • Automated installation
  • Web upload
  • Command line
  • Manual installation
  • SVN installation

29
Particularly Useful Plugins
  • Anti-spam
  • Akismet (installed)
  • BadBehaviour
  • Anti-slashdot
  • WPSuperCache
  • Identity
  • OpenID

30
Creating and Extending Plugins
  • Source Control
  • Subversion over HTTP
  • The Plugin Format
  • Descriptive Header
  • PHP Code
  • Actions (aka Events, Hooks, Callbacks)
  • do_action(my_action)
  • add_action(action_name, function_name)

31
A NeSC Plugin
  • lt?php /
  • Plugin Name NeSCPlugin
  • URI http//nesc.ac.uk/made/up/url
  • Description This adds the word NeSC to every
    page on the admin screen
  • Author Rich Boakes
  • Version 0.1
  • /
  • function nesc_tagline()
  • echo "ltp class'floaty'gt" . wptexturize( "NeSC"
    ) . "lt/pgt"
  • function nesc_css()
  • echo "ltstyle type'text/css'gt.floaty position
    absolute top 5em right 5em lt/stylegt"
  • add_action('admin_head', 'nesc_css')
  • add_action('admin_footer', 'nesc_tagline') ?gt

32
Integrating with WordPress
  • XML-RPC interface
  • editing articles,
  • publishing,
  • moderating comments
  • For example
  • iphone.wordpress.com

33
The Future of WordPress
  • 3.6million downloads of v2.7
  • GNU Public License v2
  • Three releases per year
  • features are voted for by the user community
  • Further Help
  • WordCampUK
  • Cardiff, 18-19 July 2009 (a weekend)
  • http//uk.wordcamp.org
  • Web
  • http//wordpress.org
  • IRC
  • wordpress

34
Where to find out more
  • WordCampUK
  • Cardiff, 18-19 July 2009 (a weekend)
  • http//uk.wordcamp.org
  • Web
  • http//wordpress.org
  • IRC
  • wordpress
  • Or ask me
  • rich_at_boakes.org

35
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com