installing Apache2 Mysql PHP PHPMyAdmin and WordPress locally

Well, It’s done! The key statement was: “The [Wordpress] installation places the files in the usr/share/wordpress folder. So that Apache2 knows where to find the installation folder, make a symbolic link to the Apache2 www folder:”

sudo ln -s /usr/share/wordpress /var/www/html/wordpress

(Local LAMP installation)

So, here you are my steps to install a web server localhost on Debian 8 (“Jessie”):

sudo apt-get install apache2
sudo apt-get install php5 php5-cli php5-curl php5-mysql php5-gd
sudo apt-get install mysql-server mysql-client

Something was wrong? You need uninstall that package completely:
apt-get --purge remove PACKAGE_NAME.

For example, Apache2:
sudo service apache2 stop
sudo apt-get --purge remove apache2 apache2-utils apache2.2-bin apache2-common

Alternatively, the short form is:

sudo apt-get remove apache2*

sudo apt-get autoremove
sudo apt-get autoclean

And restart Apache service with
sudo /etc/init.d/apache restart

Before to install WordPress, maybe you need to create a database called ‘WordPress’. Phpmyadmin is useful for that purpose (webserver Debian con PHP Mysql y Apache para usar WordPress localhost):
sudo apt-get install phpmyadmin

By last, following Robert Pogson, install WordPress:
sudo apt-get install wordpress
dpkg -L wordpress
sudo cp /usr/share/doc/wordpress/examples/apache.conf /etc/apache2/conf.d/wp.conf
(if you need, you can create conf.d directory first)
sudo gzip -d cp /usr/share/doc/wordpress/examples/setup-mysql.gz
sudo cp cp /usr/share/doc/wordpress/examples/setup-mysql /root/
cd /etc/apache2/conf.d
gksudo gedit wp.config:

## Without using Virtual host, hosted off /blog

Alias /blog/wp-content /var/lib/wordpress/wp-content
Alias /blog /usr/share/wordpress

Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Order allow,deny
Allow from all

Options FollowSymLinks
Order allow,deny
Allow from all

# Tips

#If permalinks or rewrite is not working you might need:

# Options FollowSymLinks
# AllowOverride All

sudo -i /etc/init.d/apache2 restartsudo -i cd
ls -l
chmod u+x setup-mysql
./setup-mysql -n wordpress localhost
sudo ln -s /usr/share/wordpress /var/www/html/wordpress

(default web server directory is /var/www/html)

If you use Opera web browser, you can taste Apache2 installation since a terminal with this command:
opera http://localhost.

Checking PHP installation:
opera http://localhost/prueba.php

opera http://localhost/phpmyadmin

By last but not least: WordPress
opera http://localhost/wordpress


One thought on “installing Apache2 Mysql PHP PHPMyAdmin and WordPress locally

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s