WordPress is best known for hosting service available through blogs http://wordpress.org/, but it is actually a content manager for general use, that can be installed on any server that supports PHP and MySQL licensed under the GPL, and source code is available and can be customized freely.
You can even install it at home to play and test the functions, need to have a pre-configured LAMP server. If you do not know what I mean, here’s a brief explanation:
Apache continues to provide only static HTML pages. When prompted for a page in PHP or another language, kicks in the appropriate module, which makes the necessary processing and returns to the Apache html page that appears. The content managers and boards then come into play, which combine the features of PHP with a database like MySQL, accessed through it. The combination of all this as the solution that is popularly called ” LAMP “( Linux Apache MySQL PHP ).
The possibility of running WordPress on your own server is not only interesting if you are interested in using the system on your own site or a site that manages, but also for dedicated server hosting companies in general, which may offer installation and administration Content Manager as an additional service. You can download the installation package from the official website.
To install, copy the package files to the folder of the web server and unzip it using “unzip” (if it is not available, install the package “unzip” using the package manager), as in:
$ Unzip latest.zip
This will create the “wordpress” folder in the folder where you unzipped the file, creating the url ” http://server/wordpress . ” If you want the manager to be available in another folder on the server, just rename it before proceeding, using the mv command, as in:
Mv wordpress blog
If you prefer to make it available through the root URL of the site, move all files within the folder to the root directory of the site.
Just like phpBB, WordPress requires a database and a user access to the MySQL server you can add them quickly through the MySQL prompt, using the commands we’ve seen before:
$ Mysql-u root-p
mysql> CREATE DATABASE wordpress;
mysql> GRANT ALL ON wordpress;
mysql> FLUSH PRIVILEGES;
The next step is to adjust the configuration of WordPress so that it uses the database created. For this, the first step is to access the root folder and rename the file “wp-config-sample.php” to “wp-config.php”, as in:
$ Cd wordpress
$ mv wp-config-sample.php wp-config.php
Open the file using a text editor and set any options for the database, adding the database, user and password created:
/ / ** MySQL settings ** / /
define (‘DB_NAME’, ‘ wordpress ‘); / / The name of the database
define (‘DB_USER’, ‘ wordpress ‘); / / Your MySQL username
define (‘db_password’ ‘ 8oNqrQsh ‘) / / … and password
define (‘DB_HOST’, ‘localhost’) / / 99% chances are, you will not need to change this value
The “DB_HOST” indicates the address of the MySQL server used. Except where you are using separate servers for the function of web server and database, we use “localhost” or “127.0.0.1” that guide the system to contact a MySQL server running on the same machine.
A curiosity is that the file “wp-config.php” gets with read permission for everyone. However, if you try to access it directly from the browser (http://my-site/wordpress/wp-config.php), or try to download it from another machine using wget (or other download manager) will realize that the system always delivers an empty file instead of displaying the passwords. This is because of the extension. “Php”, the web server always processes the file using the PHP interpreter, without displaying it directly. A PHP function within the file then takes care of showing the blank page instead of displaying the configuration information.
Continuing, after setting up the file, just complete the installation by accessing the script via browser “wp-admin/install.php” folder inside the installation of WordPress, as in ” http://mydomain/wordpress/wp-admin/install.php “or” http://mydomain/wp-admin/install.php . ”
The installer asks only the title of your blog and e-mail contact. By clicking the “Install WordPress” the installation is completed automatically:
Thereafter, the remaining steps are done through the WordPress admin interface, available via the folder “wp-admin” in the installation directory, as in ” http://mydomain/wordpress/wp-admin/ . ” Simply login using the password created during installation: