WordPress Codex versus Make

Tags:

wpdev-screenshot

A presentation in LibreOffice Impress, for the July 2014 meeting of WPJax.

Fix: Perlbrew can't install 5.21.2

Tags:

If you find that perlbrew is unable to install perl 5.21.0, and the build log shows the following message:

First let's make sure your kit is complete. Checking...
Looks good...

*** WHOA THERE!!! ***

This is an UNSTABLE DEVELOPMENT release.
The version of this perl5 distribution is 21, that is, odd,
(as opposed to even) and that signifies a development release.
If you want a maintenance release, you want an even-numbered version.

Do NOT install this into production use.
Data corruption and crashes are possible.

It is most seriously suggested that you do not continue any further
unless you want to help in developing and debugging Perl.

If you still want to build perl, you can answer 'y' now,
or pass -Dusedevel to Configure.

Do you really want to continue? [n]

Okay, bye.

This is a known and resolved issue and has been patched. The simplest way to make things work is to simply say:

$ <span style="text-decoration: underline;">perlbrew self-upgrade</span>
$ <span style="text-decoration: underline;">perlbrew install 5.21.2</span>   
  ## works now.

WebGUI8 pre-release install

Tags:

Here's a successful installation of the nascent WebGUI 8 as it stands, as of early August 2014.

I fired up a barebones Debian 7.6 box. One from Linode would work nicely.

NOTE: If you want to use a later version of Perl than comes bundled with your Linux distribution, you'll have to install it system-wide. The installer does not yet work with perlbrew.

For now you'll have to run the installer as root, or with sudo. (The only step that fails is when /etc/nginx/conf.d/webgui8.conf gets created; this should be corrected fairly soon)

To start off, install some basics.

# <span style="text-decoration: underline;">apt-get install gpm git sudo
</span>### Assume user named bob. Add the devel group:
# <span style="text-decoration: underline;">addgroup devel</span>
# <span style="text-decoration: underline;">usermod -a -G devel bob</span>
### optional, personal preferences
# <span style="text-decoration: underline;">apt-get install screen htop
</span># <span style="text-decoration: underline;">apt-get install emacs23-nox <a class="inter DebianPackage" href="http://packages.debian.org/emacs-goodies-el"><span class="page">emacs-goodies-el</span></a>
</span>

Note: emacs-goodies-el includes autoloading modules such as perldoc which gives you convenient Perl documentation viewing right inside the One True Editor™.

Then, we will need a database. The installer currently has difficulty installing mysql/Percona (Percona fails because at least as of Debian 7.6, the module still depends on openssl0.9.8 which can't be installed as it's a downgrade from openssl1.0.x that comes with Debian), and I'd prefer MariaDB in any case, so let's take care of this now:

Following the instructions from MariaDB use the following commands on Debian:

# <span style="text-decoration: underline;">apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db</span>
# <span style="text-decoration: underline;">echo deb http://ftp.utexas.edu/mariadb/repo/10.1/debian wheezy main > /etc/apt/sources.list.d/mariadb.list</span>
# <span style="text-decoration: underline;">apt-get update</span>
# <span style="text-decoration: underline;">apt-get install mariadb-server</span>

Note: Recent versions of Debian support putting *.list files in the sources.list.d/ directory, which is a handy way of avoiding management and manual editing of the sources.list file itself. On Ubuntu, you can use add-apt-repository (instead of creating the mariadb.list file as shown above). UBUNTU ONLY:

# <span style="text-decoration: underline;">sudo add-apt-repository 'deb http://ftp.utexas.edu/mariadb/repo/10.1/debian wheezy main'</span>

You will also need a library for the PNG Imager. Again, the installer should encompass this, but for now, follow instructions from Imager::File::PNG documentation to prevent any dependency resolution failures later:

# <span style="text-decoration: underline;">apt-get install libpng12-dev</span>

I downloaded the latest pre-release installer into a temporary directory as follows. Note the use of sudo -g to execute the command with devel being the effective group. Also, I set the umask to 2, which gives everyone in the devel group write access to all the created files and directories.

# <span style="text-decoration: underline;">cd /opt</span>
# <span style="text-decoration: underline;">umask 002</span>
# <span style="text-decoration: underline;">sudo -g devel     </span>  <span style="text-decoration: underline;">git clone https://github.com/AlliumCepa/webgui</span>

This should place a copy of the git repository in the webgui subdirectory. Now, run the installer:

# <span style="text-decoration: underline;">cd /opt/webgui/installer/</span>
# <span style="text-decoration: underline;">perl ./webgui_installer.pl</span>

and follow the prompts. If something goes wrong, you'll have to follow the recovery procedure below. But if you get this far:

Running upgrade script.... Installation is wrapping up. /data/webgui.sh shows how to manually launch WebGUI.

and then:

│┌Comments─────────────────────────────────┐│
││Installation complete.  Go to http://    ││
││www.example.com and set up the new site. ││
││The admin user is "Admin" with password  ││
││"123qwe".                                ││
││Please hit any reasonable key to exit the││
││installer.

you should be ready to, at last:

# <span style="text-decoration: underline;">service nginx restart</span>
# <span style="text-decoration: underline;">bash /data/webgui.sh</span>

and browse to your www.example.com (presuming you have defined www.example.com in /etc/hosts to point to 127.0.0.1)

Recovery

To retry the installation, before re-running the installer, you must do:

# <span style="text-decoration: underline;">userdel webgui_user</span>
# <span style="text-decoration: underline;">mysql -u root -p</span>
mysql> <span style="text-decoration: underline;">drop database www_example_com;</span>
mysql> <span style="text-decoration: underline;">exit</span>
# <span style="text-decoration: underline;">rm -rf /data</span>

NOTE: You can work around many of the abort-on-error conditions if you need to re-run the installer, by pressing "s" to skip individual commands.

WebGUI versus WordPress: An overview

Tags:

A different, and more detailed albeit slightly dated, feature comparison can be found at CMS-Matrix.

In general, WebGUI tends to bundle the most-used features, whereas WordPress leaves most of them to plugins. WordPress does have a vibrant plugin and theme community, but they are often outmoded and of varying quality.


WordPress, hosted on typical Shared or VPS

WebGUI typical V8

Language

PHP

Perl

Template System

Theme files, written in PHP

Template::Toolkit

HTML5 Framework

None by default. Built-in jQuery conflicts with Bootstrap.

YUI among others [wikipedia]

Object Orientation

Partly, built-in PHP

Moose[1]

Database

MySQL

MySQL, possible PostgreSQL support

Web Server

Apache

nginx

Web Server Linkage

mod_php

Plack [2]plackup, starman and starlet

Multi-Site

One WP install can serve multiple sub-sites, but many global variables mean unrelated virtual hosts require entirely separate installs

Object-oriented, so theorietically possible to have a single installation serve unlimited unrelated virtual hosts

  1. Particularly Moose attributes, method modifiers and roles.

  2. Plack::Response and Plack::Request objects

Prevent WordPress from asking FTP details

Tags:

When installing a new plugin, or upgrading an existing theme, plugin, or WordPress itself, you may be asked for FTP details. But, you say, I thought I had this configured to update directly. Here's how to force WordPress to upgrade without FTP.

In your wp-config.php file, add a line near the top:

define('FS_METHOD', 'direct');

This forces WordPress to write to files directly. Once this is done, you will get error messages that better explain what isn't working.

For example, you may need group write privileges on the wp-content/upgrade directory:

chmod g+w wp-content/upgrade

If you get this error:

Could not remove the old plugin.

you will also need to ensure there is group write on all the plugins themselves:

chmod -R g+w wp-content/plugins