Tag Archives: Wordpress

Webserver on Raspberry Pi

As an experiment this site is now running on my Raspberry Pi.

Assumptions you have setup your Raspberry Pi with Raspbian with a static IP, and allowed port 80 through your firewall to that static IP address.

Please remember to make sure you OS is up to date:

sudo apt-get update; sudo apt-get upgrade

Installing Nginx

The first peace of software you will need to install is Nginx

sudo apt-get install nginx

Now we can start Nginx

sudo /etc/init.d/nginx start

You can now test if it’s working by putting in the IP address of your server in a browser to see if it works e.g.

The browser will now display a Page saying “Welcome to nginx”

Install PHP

Use the next command to install PHP

sudo apt-get install php5-fpm

Now we need to make some configuration changes, now we need to make some configuration changes

sudo nano /etc/nginx/sites-available/default

Scroll down the configuration file and uncomment by removing the #

listen 80; ## listen for ipv4; this line is default and implied

Set the serve name to your server name

server_name www.webwhitenoise.com;

Change the index line to the following

index index.php index.html index.htm;

Uncomment the next section in the configuration file

location ~ \.php$ {
 fastcgi_split_path_info ^(.+\.php)(/.+)$;
 # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
 # # With php5-cgi alone:
 # fastcgi_pass;
 # # With php5-fpm:
 fastcgi_pass unix:/var/run/php5-fpm.sock;
 fastcgi_index index.php;
 include fastcgi_params;

Now exit from nano and remember to save the changes

Now we need to edit the php.ini configuration file

sudo nano /etc/php5/fpm/php.ini

Find cgi.fix_pathinfo in the file and change it as follows


Now we need to reload PHP and Nginx

sudo /etc/init.d/php5-fpm reload && sudo /etc/init.d/nginx reload

You can now test if PHP is working on Nginx by adding a index.php file tot he root of the server

cd /usr/share/nginx/www
sudo nano index.php

Add the following line to the file

<?php phpinfo(); ?>

If you now refresh the webpage we opened earlier in the browser it shlould display the PHP info page.

Install MySQL server

Now we install MYSQL

sudo apt-get install mysql-server

As a part of this process you will be prompted to enter a password, this password will be the root password for MySQL.

Once this process completes install MySQL Client and MySQL PHP components

sudo apt-get install mysql-client php5-mysql

Now we need to setup a database and user in MySQL

Connect to the MySQL Server using the root user, you will be prompted for the password

mysql -uroot -hlocalhost -p

We now create a database, wordpressdb represents the name of the database

CREATE DATABASE wordpressdb;

Now we create a user for WordPress to use to access the database, wordpressuser represents the user id and password_here a password. Root should not be used

CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'password_here';

Now we grant this user access tot he database

GRANT ALL PRIVILEGES ON wpdb.* TO 'wordpressuser'@'localhost';

Flush the privileges for the changes to take effect


Now press CTRL + C to exit MySQL

Now test the username against the database

mysql -uwordpressuser -hlocalhost wordpressdb -p

Now press CTRL + C to exit MySQL


You now have a working server server with Nginx, PHP and MySQL ready to use.

WordPress 3.2 Released

WordPress 3.2 has been released, I did come accross a problem in updating.

When updaingting it may be wise to deactivate some of your plugins because I was getting Fatal error: Allowed memory X bytes exhausted (tried to allocate X bytes) in /home/<account_name>/public_html/wp-includes/class-http.php on line 1426, when you deactivate some of your plugins you will reduce your memory needs. Of course if your host is giving you a generious limit then you may not come accross this problem. If deactivating all your plugins, which may be overkill, doesn’t work you may have to ask your host to increase your limit while you do the upgrade.

New features, sourced from Codex, are as follows:

  • Refreshed Administative UI – Admin redesign
  • New Default Theme “Twenty Eleven” – Uses the latest Theme Features
  • Full Screen Editor – Distraction free writing experience
  • Extended Admin Bar – More useful links to control the site
  • Requirements Changes
    • PHP 5.2.4 or greater (old requirement – since WordPress 2.5 was PHP 4.3 or greater)
    • MySQL 5.0.15 or greater (old requirement – since WordPress 2.9 was MySQL 4.1.2 or greater)
  • Enhanced Browser Compatibility
    • Drop Internet Explorer 6 support
    • Start End-of-life (EOL) cycle for Internet Explorer 7
    • Browse Happy notify users of out-of-date browser
  • WordPress is Faster and Lighter
    • Faster page loads — We’ve gone through the most commonly loaded pages in WP and done improvements to their load time
    • Faster Upgrades — The update system now support incremental upgrades so after 3.2 you’ll find upgrading faster than ever
    • Optimizations to WP_Filesystem — Updates over FTP are now much quicker and less error prone
    • Stream downloads to the filesystem — Improves update times and lowers the memory footprint
    • Performance improvements for wptexturize()
    • Remove PHP4 compatibility including timezone support
    • More efficient term intersection queries
    • Some optimizations in the HTML sanitizer (kses)
    • Speed optimizations for is_serialized_string()
    • Cache the Dashboard RSS Widgets HTML output to reduce unnecessary Ajax requests as well as the memory footprint
    • And many other improvements and tweaks

User Features


  • Admin Bar: Add a Themes submenu under Appearance, for consistency
  • Admin Bar: Add View Site/Dashboard links, ‘View X’ links in the admin, ‘View’ action link for terms, new custom taxonomy string: view_item, defaulting to ‘View Tag’ and View Category’
  • Admin Bar: Support Edit link for Attachments
  • Switch from “Panel/SubPanel” to “Screen” in inline documentation and Codex links
  • Add collapse link to admin menu
  • Help Tab text updates
  • Favorites menu no longer exists
  • New Freedoms (rights) and Credits links at bottom of admin screens
  • Use monospaced font for HTML editor
  • Validate the HTML in the admin area
  • Make copying the PressThis bookmarklet code easier in WebKit browsers
  • Move copyright notices to license.txt
  • Refresh login form styles to match admin style


  • Change View All Buttons into plain links
  • Show full set of status links in recent comments box
  • Drop “Change Theme” button
  • Update core UI changes; “Update Automatically” changed to “Update Now”, first core update is now a primary button
  • Core support for partial updates


  • Change Menu Name from ‘Posts’ to ‘All Posts’
  • Show the sticky posts checkbox (“Stick this post to the front page”) Only when author has ‘edit_others_postscapability
  • Updated styles for the Visual editor buttons
  • Full screen editor experience called Distraction Free Writing – accessed via the Toggle Fullscreen mode tool in the Visual editor and fullscreen button in the HTML editor (Trac Ticket 17198)
  • New sprite for the TinyMCE buttons
  • Fix pagination when searching or filtering posts


  • Add ‘Add New’ button to edit media
  • Update the blip.tv oEmbeds


  • Change Menu Name from ‘Links’ to ‘All Links’
  • Add ‘Add New’ button to edit links


  • Change Menu Name from ‘Pages’ to ‘All Pages’


  • New comment bubble styling


  • New Default theme – TwentyEleven – based on Duster Theme (Trac Ticket 17198).
  • Allow selecting previously uploader headers and randomly serving previously uploaded or default headers
  • Denote images that are headers or backgrounds in the media ui
  • Show hierarchy for pages and taxonomies in nav menus admin
  • Introduce new is_multi_author() template tag to make it easier for themes to have different behaviour when a site has more than one author
  • Be less specific about theme repo licenses (as they can vary in specifics). They are all compatible with the license WordPress uses


  • Allow plugins to disable screen options with filter
  • Be less specific about plugin repo licenses (as they can vary in specifics). They are all compatible with the license WordPress uses


  • Change Menu Name from ‘Tools’ to ‘Available Tools’
  • Press This bookmarklet redesign
  • UI refresh for Press This
  • Export commentmeta


  • Change Menu Name from ‘Users’ to ‘All Users’
  • Add ‘Add New’ button to edit users


Install Process


  • Show access denied page and list a user’s sites if they visit an admin they don’t have permissions for rather than redirecting to the users’ primary blog
  • Make “Space Used” gray instead of green in multisite Right Now box
  • Make user validation when adding a user via network admin consistent with adding a user elsewhere and provide better feedback for validation problems
  • Allow Pagination for Must-Use/Dropin plugins; respect WP_CONTENT_DIR & WPMU_PLUGIN_DIR for help text; move help text into WP_Plugins_List_Table
  • Rename network admin submenus to not clash with top level menus

Development, Themes, Plugins

  • Add a per-post-type nav menu items filter for plugin control
  • Add an extra FTP_LANG_DIR override constant to short-circuit WP_Filesystem_Base::find_folder(WP_LANG_DIR)
  • Add .ics / text/calendar to the whitelist of allowed file types
  • Add cache_domain argument to get_terms() to allow caching to a unique set of cache buckets; useful when taxonomy queries have been modified via filters and need their own cache space
  • Add menu id for admin-bar’s dashboard and view-site link
  • Add option_page_capability_$option_page filter
  • Add quotes to [value=”some”] selectors re: jQuery
  • Add theme feature strings for translation
  • Allow custom author elements such as email
  • Allow get_pages() to support multiple post statuses
  • Allow plugins to control user and network admin canonical redirect
  • Allow plugins to hook into wp-admin/update-core.php
  • Allow querying empty meta values
  • Allow retrieving comments by post type, status, author, author, name, or parent. Fetch only published posts for recent comments widget
  • Allow taxonomies to be queried by $_GET parameters on non-taxonomy url’s
  • Allow WP_Query ‘post_status’ parameter to accept an array, as well as a singular value and comma separated list
  • Apply ‘editable_slug’ filter to parent page slugs in get_sample_permalink()
  • Apply ‘editable_slug’ filter in post_slug_meta_box()
  • Centralize pagination bound exceeding redirects for list tables
  • Change esc_url_raw references to esc_url
  • Check return value of wp_check_browser_version() and make return value consistent
  • Code readability improvements
  • Default WP_LANG_DIR to `WP_CONTENT_DIR/languages` when `wp-includes/languages/` doesn’t exist
  • Deprecate wp_clone() but left the function in wp-includes/load.php
  • Don’t 404 for empty post type archives
  • Don’t load themes functions.php for upgrades
  • Don’t refresh the admin menu after page load, apply the user-state from PHP, fix behaviour after folding the menu
  • Don’t set fields to empty values in _wp_translate_data()
  • Don’t show broken ‘View’ links when a custom post type is not publicly queryable
  • Don’t use array calling for post_status in wp_edit_attachments_query() to prevent any use of the deprecated query_string filter (as in, don’t use it)
  • Ensure all theme searching is done case-insensitive
  • Fix handing of super admins that don’t have a blog in get_dashboard_url() and login
  • Fix mistaken use of publicly_queryable in when public was what was intended for register_post_type()
  • Fix notice when invalid taxonomy is passed to wp_tag_cloud()
  • Hide update bubble counts for users who can’t perform the update
  • Introduce get_screen_icon()
  • Introduce is_multi_author() to check if more than one author has published posts for this site
  • Introduce ‘name_admin_bar’ label and ‘show_in_admin_bar’ (Add New menu) argument for Post Types
  • Introduce Stream-To-File for the WP_HTTP API – reduces memory consumption during file downloads; implemented in download_url() for upgraders
  • Introduce wp_http_supports() as replacement for the http_transport_(get|post)_debug hooks
  • Introduce WP_MAX_MEMORY_LIMIT’ constant for the high memory limit set when image processing and unzipping; ensure it is always filterable by plugins as well as configurable in wp-config.php
  • Introduce WP_Meta_Query and relation support
  • Pass image URL’s to thickbox via L10n in script-loader.php; allows thickbox to be used on any page in the install without defining the image URL variables
  • Properly handle https in ixr client
  • Provide more arguments to the widgets on the 404 page so as to avoid notices
  • Rename duplicate ‘delete_post’ and ‘deleted_post’ actions to ‘before_delete_post’ and ‘after_delete_post’
  • Remove support for the PHP HTTP Extension from WP_HTTP. The PHP HTTP Extension is a wrapper around libcurl and fopen() providing limited configuration and is supported on a minority of servers due to its non-default inclusion
  • Return false from is_page_template() if the template is default
  • Set is_* flags for AND taxonomy queries
  • Set the mb_string internal encoding to ISO-8859-1 whilst uncompressing archives using PclZip; fixes ‘PCLZIP_ERR_BAD_FORMAT (-10) : Invalid block size’ errors on systems utilising mbstring.func_overload
  • Stop themes and plugins from overriding the admin bar CSS
  • Support Chrome Frame
  • Update jQuery to 1.6.1
  • Update jQuery UI to 1.8.2
  • Update json2.js
  • Update _old_files
  • Update phpass
  • Update phpmailer and smtp to 5.1
  • Update pop3 class
  • Update TinyMCE to 3.4.2 (Trac Ticket 17086)
  • Update wp_mail to correctly call the Address adding functions on PHPMailer for To, CC, BCC and preserving support for full RFC2822 address specifications
  • Updated PHPdocs for wpdb class, XML-RPC functions, HTTP API, add_submenu_page, wp_templating_constants(), wp_check_browser_version()
  • Use the post type object in get_posts_by_author_sql() and add a post type parameter to count_many_users_posts(); pub_priv_sql_capability filter is considered deprecated
  • Validate post status against capabilities in Press This
  • Verify certificate matches both the common name and the provided hostname; WP_HTTP_Curl requires CURLOPT_SSL_VERIFYHOST be either 2 or false
  • When upgrading plugins/themes, if the new destination folder is different from the previous folder, delete the old folder upon upgrade
  • XML-RPC add support to wp.getPostFormats to provide a list of the currently supported post formats in addition to the complete list
  • XML-RPC allow Pages to have a status of pending
  • XML-RPC include the post status in the response for mt.getRecentPostTitles calls
  • XML-RPC introduce a special wp_die handler for XMLRPC requests to ensure we send an XML response

WordPress 3.2 Codex Version Info

WordPress 3.0.5 Released

WordPress 3.0.5 is available, this release fixes the following:

  • Fix XSS bug: Properly encode title used in Quick/Bulk Edit, and offer additional sanitization to various fields. Affects users of the Author or Contributor role. (r17397, r17406, r17412)
  • Fix XSS bug: Preserve tag escaping in the tags meta box. Affects users of the Author or Contributor role. (r17401)
  • Fix potential information disclosure of posts through the media uploader. Affects users of the Author role. (r17393)
  • Enhancement: Force HTML filtering on comment text in the admin (r17400)
  • Enhancement: Harden check_admin_referer() when called without arguments, which plugins should avoid. (r17387)
  • Update the license to GPLv2 (or later) and update copyright information for the KSES library.

WordPress 3.0.3 Released

WordPress 3.0.3 is available, this release fixes issues in the remote publishing interface, which under certain circumstances allowed Author- and Contributor-level users to improperly edit, publish, or delete posts.

  • Fixes issues in the XML-RPC remote publishing interface which under certain circumstances allowed Author- and Contributor-level users to improperly edit, publish or delete posts. (r16803)

Change Log

WordPress 3.0.2 Released

WordPress 3.0.2 is available, it fixes a few bugs and a SQL injection flaw.

  • Remove pingback/trackback blogroll whitelisting feature as it can easily be abused
  • Fix canonical redirection for permalinks containing %category% with nested categories and paging
  • Fix occasional irrelevant error messages on plugin activation
  • Minor XSS fixes in request_filesystem_credentials() and when deleting a plugin
  • Clarify the license in the readme
  • Multisite: Fix the delete_user meta capability
  • Multisite: Force current_user_can_for_blog() to run map_meta_cap() even for super admins
  • Multisite: Fix ms-files.php content type headers when requesting a URL with a query string
  • Multisite: Fix the usage of the SUBDOMAIN_INSTALL constant for upgraded WordPress MU install


WordPress 3.0

WordPress 3.0 was released a few days ago. Below are some of the new things that should get your attention:

  • WordPress and WordPress MU have merged, allowing the management of multiple sites (called Multisite) from one WordPress installation.
  • New default theme “Twenty Ten” takes full advantage of the current features of WordPress.
  • New custom menu management feature, allows creation of custom menus combining posts, pages, categories, tags, and links for use in theme menus or widgets.
  • Custom header and background APIs.
  • Contextual help text accessed under the Help tab of every screen in the WordPress administration.
  • Ability to set the admin username and password during installation.
  • Bulk updating of themes with an automatic maintenance mode during the process.
  • Support for shortlinks.
  • Improved Custom post types and custom taxonomies including hierarchical (category-style) support. (Try the Custom Post Type UI or GD Custom Posts And Taxonomies Tools plugins to see the possibilities.)
  • A lighter admin color scheme to increase accessibility and put the focus more squarely on your content.

WordPress 3.0 Version Info