Introducing WordPress Silex, install WordPress on Debian or Ubuntu in less than a minute

I was feeling stupid every time I had to install a new WordPress, I’d need to go back to the official website to read the instructions again. I could have made myself a Wiki article in Redmine but I decided I was doing it often enough to take a more radical approach. The idea was born to make a script to automate the installation process.Ā I wanted to call it WordPress Rocketeer but a plugin with this name already existed.

WordPress Silex

To use WordPress Silex (WPSilex in short), you need a vanilla Ubuntu or Debian. I’ve a preference for Debian so I’m sorry but WPSilex lacks testing on Ubuntu.

No need for a cup of coffee!

Unless you’re an advanced user, I don’t recommend you use Silex in an environment with websites or services running that were not installed by WPSilex. Indeed, WPSilex could instruct you to do something that would break your existing services.

Blunt and ugly, it might still do the job.

Blunt and ugly, it might still do the job.

What does:

  • Get you a fancy new WordPress blog up and running at light speed
  • Get the latest version online
  • Get salts from WordPress (That could change as I would prefer to generate them locally)
  • Configure the database with a new user with a random password dedicated to a Redmine instance
  • Configure a web server

What it doesn’t do:

  • Allow you to choose the installation language
  • Coffee šŸ™
  • Fail gracefully

Choices

You don’t need any pre-requirements because the script will guide you installing everything needed. However you need to make a choice for the web server:

  • Apache2
  • Nginx(recommended)

For the database there is no choice for the moment, only MySQL is supported

Let’s do it!

You need to know your MySQL Administrative password (root) if MySQL is already installed. The information the script will ask you are:

The name of the instance (for example: “myblog”). Lower case, alphanumerical, no spaces

The MySQL Administrative user (e.g. root)

The MySQL Administrative user’s password

DNS name of the site (for example: “myblog.domain.com”). it will be used to configure the web server.

Debian

As a root user:

Ubuntu

As a root user:

Configure your instance by creating a user with a password right after finishing the installation. Otherwise, someone else could take over your instance!

What’s left?

  • Configure your DNS
  • Configure your email server if needed
  • Configure your language in the wp-settings.php file (WP_LANG)
  • Review the configuration files:
    /etc/apache2/sites-enabled for Apache2
    /etc/nginx/sites-enabled for nginx
Note that the WordPress files are in /var/www/

 

Leave a Reply