WordPress it is much more than one blogging tool, And it would be a mistake to just stick with that aspect of this one CMS (Content Management System, or content management system) that can become an all-in-one solution for a large number of cases as it even has plugins to set up ecommerce stores and there are powerful analytics and SEO tools, In order to improve the visibility of our content on the web.
Below we will see how to install WordPress on Ubuntu, Something that fortunately is quite simple and will allow us to host content on our server. So, of course, we must first meet some requirements and one of them is that of have a functional LAMP installation (Acronym for Linux + Apache + MySQL + PHP), so this will be the beginning of our post today.
We install Apache:
# Apt-get update
# Apt-get install apache2
Once installed, we will test that the server is running, and so we entered the local or internal URL of our server, which is in http: // localhost.
We now install PHP:
# Apt-get install php5 libapache2-mod-php5 php5-mcrypt
# /Etc/init.d/apache2 restart
Now we need to install MySQL:
# Apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
# / Usr / bin / mysql_secure_installation
You are going to be asked to enter the root password, And then we will have to indicate some issues, related to execution permissions, remote access, loading tables and others, for which fortunately we are offered some help but it is not too much accept the instructions by entering ‘i’. And then we can get stronger with all this, but for starters there is no problem accepting the default settings.
Finally, we created the root user for mysql, We set the password (we changed ‘pleasure for which we want to use) and restart Apache:
mysql -u root -p (we will be asked for the root key, which we enter)
CREATE DATABASE based data;
CREATE USER userp @ localhost identified BY ‘plaerdemavida’;
Now let’s give our WordPress user access to everything you need for your work:
GRANT ALL PRIVILEGES ON wordpress. * TO userwp @ localhost;
# /Etc/init.d/apache2 restart
Okay, now we have to download Worpress:
To extract to an own directory we enter:
Now we have to configure WordPressFor this we need to edit the wp-config-php file:
And we look for the options that interest us, which are those of DB_USER, db_name and DB_PASSWORD, so the file should look more or less like this, given that the password and user data must be the which we enter above:
/ ** MySQL settings – You can get this info from your web host ** //
/ ** The name of the database for WordPress * /
define (‘db_name’, ‘based data’);
/ ** MySQL database username * /
define (‘DB_USER’, ‘userp’);
/ ** MySQL database password * /
define (‘DB_PASSWORD’, ‘plaerdemavida’);
Now that we have everything set up properly we are left with the last steps, and the first is that of copy this WordPress configuration into the root directory of your LAMP server installation, So that it can serve this content to our visitors. We can do this by:
# Cp -R ~ / wordpress / * / var / www / wordpress
Now we enter the WordPress administration panel, at http: // localhost / wordpress, where we have to complete the information of the administrator account (user, password) and then simply let ourselves be guided by the tool configuration. That’s it, we already have WordPress installed on Ubuntu, and we can start working with it.