Basic steps to get a webserver up, simple LAMP-stack configuration. LAMP stands for Linux,Apache,MySQL,PHP. These instructions will get all those components working together for you to put up a website. As a bonus, the normal WordPress set-up is included at the bottom.

First, lets install MySQL:
apt-get install mysql-server mysql-client

Some other variations might include apt-get install mysql-client-core-5.5, but the first command should work

Install apache:
apt-get install apache2

Install PHP:
apt-get install php5 libapache2-mod-php5
apt-get install php5-mysql
a2enmod php5

Add these lines to `locate php.ini` if they are not in there:
extension=mysql.so
extension=mysqli.so

Install WordPress:
Well wordpress is its own beast, but the instructions from their site read:

    Download and unzip the WordPress package if you haven't already.
wget https://wordpress.org/latest.tar.gz && tar -zxvf latest.tar.gz

    Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.
mysql -u adminusername -p
CREATE DATABASE databasename;
GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" IDENTIFIED BY "password";
;NOTE: hostname should probably be localhost
FLUSH PRIVILEGES;
EXIT

    (Optional) Find and rename wp-config-sample.php to wp-config.php, then edit the file (see Editing wp-config.php) and add your database information.
curl https://api.wordpress.org/secret-key/1.1/salt/

    Upload the WordPress files to the desired location on your web server:

    Run the WordPress installation script by accessing the URL in a web browser. This should be the URL where you uploaded the WordPress files.
        If you installed WordPress in the root directory, you should visit: http://example.com/
        If you installed WordPress in its own subdirectory called blog, for example, you should visit: http://example.com/blog/
Setting Up a Server for Apache/MySQL/PHP/WordPress

Leave a Reply

Your email address will not be published.