Its ability to power thousands of server installations, both public and private, has made Ubuntu WordPress a popular and trusted solution for all types sites.
Ubuntu Server is not only powerful but a user-friendly distribution as well, thanks to the dedicated team at Canonical and the thousands of global volunteers that contribute to improving its functions.
Publishing and maintaining a blog becomes easier with a trusted server. Let me outline here how to install the Ubuntu server that works seamlessly with the WordPress blogging software.
This will allow running either a personal blog from home or a corporate blog in the workplace minus the headache. Like thousands of companies, WordPress is my choice of blogging software, and even use it for my office.
I’ve been maintaining a dozen WordPress installations, with varying levels of traffic and popularity. It’s easy to maintain and very user-friendly, even for beginners. You can check out the WordPress blogging software here http://www.wordpress.com and get acquainted with it.
By using beginner’s guides, you can start creating your very own WordPress sites. Your minimal knowledge of HTML and CSS is enough as instructions use simple terms and clear-cut directions. So there is no need for any third-party themes.
The ancient African word Ubuntu translates to “humanity to others.” It is also said to mean “I am what I am because of who we all are.” The Ubuntu of today – which relates to computer technology – may not be as profound. But at its core is the spirit of the original African word.
Its history is nothing mystical.
Free software was unheard of in early 2000. Linux had made a name as an enterprise server platform. From Linux’s most established project – Debian – Mark Shuttleworth plucked out a small team of developers and tasked them to create a user-friendly Linux desktop. Thus Ubuntu was born.
Today, Ubuntu is not just an operating system. It is also a server that can help maximize use of your computer systems infrastructure.
Given that Ubuntu is more associated with desktops, and lately mobiles, why go for an Ubuntu Server? People tend to forget Ubuntu also makes an excellent server distribution.
It’s there quietly running in the background, helping operate several of the world’s coolest companies.
If Ubuntu is more desktop why consider it as server? Simply put, asking that question means you likely aren’t thinking to do it. But you still may want to go for it. Why?
First, installing a server can be quite fun.
Then, it teaches you things about the system you never thought to learn about.
And third, you get to have your own server at home so even with the Internet down. It won’t make you feel like you’re totally disconnected, albeit on a much smaller scale and often not as totally engaging.
Convert or Build from Scratch
Besides, having a server is far more sensible if you intend to make your own website. You have more control over your website with a server setup than with a simple desktop setup, including the ability and freedom to customize its appearance.
And if you still haven’t clued in, it’s not overly complicated to convert a desktop installation into a server. All you need is to install and set up a couple of things. Some people are even convinced that converting is far easier than setting up a server from scratch.
Of course, compared to desktop-to-server conversion, a server from scratch is often meaner and cleaner. And like anything built from scratch, you totally understand exactly what is in front of you.
Resources are plenty if you’re up to setting up your own server. There’s the book “Beginning Ubuntu Server Administration: From Novice to Professional”. When you go visit and click around, there’s a host of similar titles to browse through.
There’s also a website that takes you through the process step-by-step. Whether you want to do this using the book, via online or by trial and error, is a matter of preference.
Desktop or Server: The Difference
When you opt for a server, be clear on its purpose. A low-power draw machine may be enough to access data like multi-media and files or devices such printers or scanners. However, you’ll probably have to make do with lower-end graphics with this type.
People often get confused between a desktop and a server. The former, as previously mentioned, can be converted into a server. A server is physically different from another computer in that it’s not a laptop and it always stays on. Aside from inexpensive graphics and it has enough space to store all kinds of server resources.
The bigger difference between the two is software.
While a desktop can be converted to a server–provided it meets minimum specification requirements–servers actually do more than run applications.
Aside from managing and storing data, a server also sends and processes data within a network.
There are other servers within a server, i.e. a web server like Apache and an FTP server, among others. While these can also be set up in a desktop computer, it’s a bit more challenging to set up a Linux server.
A LAMP (Linux, Apache, MySQL, PHP) server configuration will involve installing, configuring then turning on all of these.
Unlike desktops, which handles processing, emailing and web surfing, among other functions, there’s no need for constant direct interaction with a server.
It is not the main interactive computer, so handling it is far different from a desktop.
Servers can be dangerous places, but since it does not work like the day-to-day computer, users are better able to manage them.
By default, a “super user” mode is disallowed in Ubuntu. But a server allows this so it’s possible to use this to check emails and other simple applications. At the same time, a server can be modified so that only tasks for the “super user” mode are permissible.
While there is an Ubuntu solution known as “sudo this” and “sudo that”, this is usually more inconvenient and adds difficulty in performing functions.
There are also certain scripts strictly designed for super user that won’t operate with the sudo-only environment.
With super user capacities that are easily accessible, it’s necessary to be more responsible worthy of a super user.
There are ordinary things required to start the whole process. First is a copy of the Ubuntu Server. For the present, the 10.04.1 LTS (Long Term Support) has been out in the market. LTS supports and provides security for updates up to five years. A free copy of Ubuntu Server can be downloaded here:
Aside from an Ubuntu Server, you will need to install a platform. You have the option between a physical server, or a virtual machine. Your time of a 15 minute goal maybe variable based on the speed of the physical hardware speeds.
This article is based on the following platform and specifications:
- Dell D630
- Core 2 Duo 2.10 GHz
- 2G RAM
- VirtualBox 3.2.8 Open Source Edition
Observe that the mileage may vary as it is dependent upon the hardware and network used.
The last needed requirement is a network access. This is installed on a physical machine. Just make sure that there is an access to the local network to the machine.
If you are planning on installing this network access on a virtual machine, be certain to configure the virtual machine used in the bridged networking so it is accessible local area network.
Summing up, your requirements are:
(1) an Ubuntu Server 10.04.1 LTS .iso (or printed CD);
(2) a physical or virtual machine to provision; and a local network access to the machine
Be on your way:
After requirements are prepared, get started and go. Wind up your virtual machine, or play your CD-ROM, and the installation will begin.
The guide has screenshots on every step of the process so it is so easy to follow along closely. In most cases, the default configuration is the choice.
Next step is for the installer to choose preferred or native language. English is the language in the default that is the most common selection. Notice a large number of other languages are also available.
The next step is selecting your country. English is often chosen as it is the primary language but then you will have to select a region. United States might be default but it is included in the selection.
If you ask for it, the Ubuntu installer automatically detects your keyboard layout. No would be in the default prompt but you will be allowed to select your keyboard from a list.
The auto-detection is a bit faster so it is most preferred to use. You are free to choose but be certain you select the right layout. It is very frustrating if you are not able to type correctly on your keyboard!
Next step is to give a hostname to your machine. This is an enjoyable part in the process as the unique name of the machine you’ll be working with comes from you. This sort of personalized the process as the creative name of your machine is your brainchild.
The auto-detector of your Ubuntu installer must be set promptly in your time zone to ensure that it is the right time. But most of the time installing on physical hardware, the auto-detection is usually pretty accurate.
However, installing on virtual hardware is a bit more difficult in accuracy. The screenshot taken on virtual hardware required users to select my time zone manually. If this happens to you, just look for your time zone and hit ENTER.
The next step to reckon in the installation process is the partitioning of the disks. To be on the safe side, you select the defaults.
If you are doubtful if you have or do not have specific needs, you probably don’t. The default is just right for you if your intention to set up a web server to run WordPress.
The installer will give a confirmation dialog before partitioning is written as changes to the disk. This 2nd confirmation is needed when making changes to partitions and filesystems. This is because this action will destroy any existing data on the disk(s).
You will not need to worry if you are installing on a newly created virtual machine. However, if you are installing on physical hardware, there is a risk that it will destroy any existing data. So you have to ascertain first before proceeding.
Defining the size of the disk available for installation is your own choice. The best option is to select the default that uses 100% of the available space. You can make more specific requirements at this juncture.
Last concern has something to do with the partitioning. One final confirmation is needed. Look at the screen as it creates or changes the outlines partitions. Also look at the partitions on the filesystems and formatting.
Every filesystem is related to screenshots that selected the default values. After this process is done and it is OK for none of the existing data on the machine is lost, finalize this change by selecting YES.
at this point…
Installing Ubuntu takes just a few minutes and the installer will install the base system just within the most new created partitions.
The new system that you have will need to have one user created and the user will act as the initial administrator. Ubuntu is known not to use the traditional root user. The traditional root user is usually found in the other Linux distributions.
The first user to be created will be the owner of the system. You will normally act as the root user thus you will be doing all the administrative work.
In your machine, you have an administrator field; you are supposed to enter your full names. You should then choose your user name. Ubuntu installation will suggest username for you depending on your names. After agreeing with the suggested name or installing your own user name click the continue button.
When creating your password make sure that you create a strong and a password that you will not forget. You can even record your password somewhere just in case.
Ubuntu has a unique addition of secure encrypt for your home directory.
This means that unless you have logged into your machine and you have authenticated your logins with your password all your content in your home folder are safely encrypted from other users.
Additionally, after you log out of your machine your home folder will automatically re-encrypted and your information is safely stored. Security and privacy should be you top priority and it is advisable to select the appropriate options for your machine.
Installing of the auto security updates is one of the configurations that you need for your machine.
You should check for updates or choose the options of having your machine automatically notify you of any new update that you need for your machine. This usually happens when you log in to your machine.
You need to allow your system to manage its server using the landscape. This will allow you to tie your machine server into a well know web management solution. This is offered by the Ubuntu parent company that is known as Landscape. Landscape will allow you to manage, update, and configure multiple machines using the web interface.
The server options that are actually found in the Ubuntu are user friendly, robust and they make your life easier. Ubuntu has a list of pre-configured servers that are essential for your business and that you need to use daily.
The pre-configured servers that are found in the Ubuntu include a Mail server, DNS server, Tomcat Java server, and many more.
You can configure your web server to fit the installation of WordPress. To install WordPress you need to select the LAMP server.
The Lamp server stands for the Linux, Apache, MySQL, and the PHP. These are known to be the basic requirements for your web server and they are need for your WordPress installation.
The openSSH server in Ubuntu is another server that you need for your machine. This will allow you to be able to have remote console access for your configurations and administration purposes.
The final installation is here and all the required and selected packages of the Ubuntu are finally installed. From this point, your machine will do a primary automated installation. The process might take some time so relax and grab a cup of coffee.
If your machine is slow, the process might take a long time to complete. Once all the final packages have been installed, you should be thinking of installing the GRUB boot. If the update is taking along time, take a stroll, and give your machine enough time to install all the packages.
The GRUB boot is very significant for your machines rebooting purposes. And if the process is wrongly done than you will have process when booting your machine.
Well done! You have finally completed installing Ubuntu. You can click continue and your machine will automatically reboot or you can reboot the machine manually.
Once your server is able to boot back up, you should go ahead and log in using your username and password that you have selected earlier. Remember your user name and passwords are case sensitive.
You have all the administrative rights that you need to configure your machine. If you need to further configure, change or update the system you have all the rights once you have logged in.
Remember to update the Ubuntu updates that are not automatically set. You can check for the updates from the Ubuntu website. You can also reach out for any assistance from the Ubuntu website if you run through any problem in the process of using the Ubuntu Software.
Ubuntu Server and WordPress
Ubuntu server is known to present information once you have logged in. You will find WordPress platform that is not available in any other distribution thus making Ubuntu unique.
Once you have logged in to your system, you are able to get updates and network information without having to research from the main website.
Installing and Configuring WordPress
It is very easy to install and configure WordPress. It will take just a few minutes to have WordPress installed into your machine.
The first step that you need to perform in order to configure WordPress is to verify your LAMP server.
You should ensure that the LAMP server is properly installed. You need to verify the Apache work and the PHP and ensure that they are working properly.
The IP Address
After you have confirmed that the Apache works and the PHP are properly installed and working, you should enter IP address in your new server. This is usually done by entering the IP address on your address of your web browser.
If you are unsure of your IP address, you can find the IP address on your information screen that you see upon logging in. You can also type “ipconfig” and you will be able to know your IP address.
Your IP address can also be found in your virtual machine and your local network usually gives them. Once you enter, your IP address then your network and your LAMP server will be configured in the correct manner. If all the information is correct, you should be able to see the content and that proves that it is working.
Checking PHP Installation
You should ensure that your PHP installation is well configured and well installed and you can check by performing the following:
Opening a terminal by going to the applications <Accessories and < terminals. You should then change the directories of your document rooter of the web server by performing the following command: cd/var/www
Once you have done that you should be able to change the ownership of the machine directory. This way, the user and the web server will be able to have access to your machine content.
You can do so by performing the following command, go to sudo chown<the user name>: www- data. Always ensure that all the future content of your machine will be group owned by your web server and using the command: sudo chmod g+s.
After doing the above commands you should then create a small PHP script, the script will act as a test for the PHP installation and you can do so by performing the following command : echo” < ?PHP PHPINFO();?””> index.php
All those commands are important steps that you need to undertake before being able to install the wordpress.
You should then refresh your web browser to check if the new content appears. If it does not appear, you should then try changing your URP to point the index.php.
The main goal we want to achieve is to have the PHP script display its configuration and to have the script running. If you are able to see all the content of the PHP then your apache and the PHP are properly configured and installed.
The PHP and Apache Script
We have to ensure that the IP address, PHP and the Apache are correctly configured and installed, the next step is to ensure that the wordpress software is up and running correctly.
This is usually done by:
- Configuring the database so that wordpress can be able to use it
- Downloading and installing wordpress into your machine.
We need to perform the following command to be able to configure database correctly on your machine. The commands should be configured when you are still on your machine terminals.
The commands are MySQL-u root-p. The process will ask you for your password and remember password is case sensitive. When you are installing the MySQL for the first time, you will be prompted to configure a password.
Use the same password and if you have forgotten your password you can use the below command dpkg-reconfigure MySQL-server and you will be able to reconfigure your password.
After you have been able to successfully login to your MySQL database you will see the MySQL monitor that will help you to create WordPress database for your machine and to create user.
To create database wordpress you should grant all of your machine privileges on your wordpress to ‘wordpress’@’localhost’ also IDENTIFIED BY the ‘password’.
You should change the “password” to something that you will remember and it should be unique. Always use the above two commands to create your wordpress database.
The two commands will allow you to have all the access you need to use wordpress. After completing all the above commands, you should exit the database.
Finally, you will be able to install the WordPress software into your machine. You should install and track WordPress using the latest subversion of control tools.
The reason we are using subversion control tools is because it will provide us with benefits that are not found in the traditional and downloaded zip files.
The following are the main reason why subversion is the best:
- When you use the subversion, you will be able to check out the specific revisions for your wordpress software.
- When you use subversion, you will be able to replace the required files in case you delete them accidentally.
- When you use subversion, you will be able to upgrade your installation using a single command.
How to Install Subversion Command
You can install the subversion tool by using the following command: sudo apt-get install the subversion.
Now it’s come to the easiest part of this tutorial i.e. Installing WordPress on your server.
Downloading Latest WordPress on the Server
To install WordPress on the server you will need to download it on the server. To do this type this command.
Basically what is exactly does it when you type cd and press Enter button it changes you current directory to the users /home directory. And wget command download the latest version of WordPress on your server.
Now lets move to the next thing i.e. Unzip the WordPress installer. To do this type this command.
tar xzvf latest.tar.gz
3.2 Creating Site Database and Users
Every WordPress site need a database to store posts, comments and settings. So in this step we will create a MySQL database for our WordPress site.
To do MySQL related stuff first we need to log in into the mysql administrator account. To do this type.
mysql -u root -p
You will be prompted to enter the MySQL root password. Type the password and press enter.
Now if you have entered the correct password you will be dropped in to MySQL prompt.
To create a new database type the following command.
CREATE DATABASE FirstDatabase;
Change the “FirstDatabase” with the database name you want to use.
Now the database is created. Now we will add a new user to this database. To do this type.
CREATE USER FirstUser@localhost;
Replace the “FirstUser” with the user name you want and press enter.
It is very important to protect the new user account with a password. To do this type.
SET PASSWORD FOR FirstUser@localhost= PASSWORD(“FirstPassword”);
Be sure to replace the “FirstUser” with your user name you created in the above step and “FirstPassword” with a strong password. And press enter.
Now last step of creating database is to provide the new user all the privileges. To do this type:
GRANT ALL PRIVILEGES ON FirstDatabase.* TO FirstUser@localhost IDENTIFIED BY ‘FirstPassword’;
and press enter.
Refresh the MySQL privilege information by this command.
and exit the MySQL to the shell session by typing:
and press enter.
3.3 Creating site root directory
We will need to create separate directories for different sites, so that we can host multiple sites on one server.
In this step we will create a directory for the site in the “/var/www”.
Change the directory to “/var/www”:
Create a directory for the site in “/var/www” with mkdir command:
sudo mkdir siteName
Activate the WordPress sample configuration file by renaming it:
cp ~/wordpress/wp-config-sample.php ~/wordpress/wp-config.php
Copy all the files and folder of “/wordpress” directory to the site root:
sudo rsync -avP ~/wordpress/ /var/www/siteName/
Make sure to replace the text in red with your respective directory name.
Giving ownership of the “/var/www” directory to the user.
sudo chown -R www-data:linux_username /var/www
Replace the “linux_username” with the username you created in first step ( 1.3) .
3.4 Configuring Virtual Host
As we have installed WordPress in “/var/www/siteName” directory, we will need to set up the virtual host file. So when the visitors type the site URLs they directed to the right directory.
To create a virtual host file in Apache, first we need to go to the “/etc/apache2/sites-available” directory.
Now create new virtual host file for you site located in “/var/www/siteName”.
sudo cp default siteName
After new virtual host file is created. We need to add the information into it.
For editing we have a default CLI text editor in Ubuntu and Debian called “nano”. We will edit the virtual host configuration file with nano. To do this type:
sudo nano siteName
Now substitute the information in the virtual host configuration file which a marked in redwith you site information.
Options Indexes FollowSymLinks MultiViews
allow from all
Add the two-line ServerName and ServerAlias below the ServerAdmin line.
If you have www in the default URL then add www in the ServerName and remove www from ServerAlias , So that the first 4 lines look like this.
Also make sure you have changed the “AllowOverride None” in the “” block to “AllowOverride All”. This will enable pretty permalinks.
Save the file by pressing ctrl+x then type Y and hit enter.
Now type this command to enable mod_rewrite for the pretty permalinks to work:
sudo a2enmod rewrite
Enable the virtual host file by this command:
sudo a2ensite siteName
Replace the “siteName” with the site name you have created in step 3.3
Now restart the Apache to make the changes take effect.
sudo service apache2 reload
WordPress five-minutes Install
Now visit your site and finish the installation with WordPress 5 minutes install wizard.
If you have not made changes to your domain nameservers then visit the IP address of the server on which you have installed WordPress.
for example: 18.104.22.168/wp-admin/install.php
Congratulations, now you have successfully installed WordPress on your server.
Final Step of WordPress Installation
We have installed the most important command and we are now in the last portion of installing wordpress in your machine. The wordpress is installed using the web-based installer.
Once you have opened your web browser you should change the URL to/blog/ and you will be prompted to configure your file. You should then click on create a configuration file. The next step after that is you that you will be notified of the information that is required for the process to continue.
The required information includes:
- The database name: the wordpress
- The database user name: the wordpress
- The database password: the password (the new one you have created).
- The database host: your local host
- The table prefix: wp_(the default option)
Once you have put all that information you are well sorted out and you can go ahead and click on the “lets go” step.
You have made it this far and it is time to finally let your WordPress to run and then to install.
After reaching a certain stage, you will be asked for the below details:
- Site title: the site title is the name of your blog
- User name: you can user your administrative username.
- Password: your preferred administrative password.
- Email- your preferred email addresses.
Once you have submitted the above information you have done it and the installation was a success. You should go ahead and login to your WordPress using your username and password.
The screen will remind you your administrative username and your password is usually hidden. Click on the login button and then check out the WordPress dashboard and start your blogging.
You know have the WordPress dashboard and you have all the power of WordPress blogging engine in front of your eyes.
The Ubuntu server offers an easy to use and robust platform that helps you to manage a number of internet services like the WordPress blog platform.