Home wordpress website with debian jessie

1.  Configure the hostname:

nano /etc/hosts:

127.0.0.1       localhost.localdomain   localhost

192.168.0.17   debian-yu.norikoguide.dip.jp debian-yu

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

nano /etc/hostname:

debian-yu

reboot:

(check)

root@debian-yu:/home/kiyoshi# hostname
debian-yu
root@debian-yu:/home/kiyoshi# hostname -f
debian-yu.norikoguide.dip.jp

:

2. Install the following(meta) packages using SynapticPM;

apache2:   was already installed

3. Visit 192.168.0.17;    It works! (Apahe2 Debian Default page)

4. mysql, php, phmyadmin

mysql-server   mysql-client;

php5   php5-mysql   libapache2-mod-php5

5.   Test mysql;

systemctl restart apache2
systemctl restart apache2
root@debian-yu:/var/www/html# ls
index.html  index.lighttpd.html  testph.php
root@debian-yu:/var/www/html# mv index.html index.htmll

6. Install phpmyadmin by synapticPM

Can visit 192.168.0.17/phpmyadmin, but cannot login.

7.  Set (or Reset) root passwd for phpmyadmin;

# mysqladmin -p******;

phpmyadmin login successfully as root.

8. Install ncftp via synapticPM.

9. This time I  move the wp-site kblog at 192.168.0.16 to kblog at 192.168.0.17.

9.1  Directly ftp  whole kblog directory of 192.168.0.16 via into /var/www/html  using ncftp (get -R) as root.  ( ncftp -u nakym 192.168.0.16 )

9.2  Get in database (as root set in 7. above). Create database wpdb, user wpnakym and his password as is written in wp-config.php.

9.3  Export the relevant extracted database from 192.168.0.16.

9.4 Import the exported database into 192.168.0.17.  Now you should be able to browse the nakym2.tokyoguide-noriko.net, but with 192.168.0.16 active.

9.5 Place knsecret.php in therelevant new directory (192.168.0.16/html/knblog), visit that file and follow the direction ( replace 192.168.0.16/kblog with nakym2.tokyoguide-noriko.net ). Now everything is almost O.K., but problem with displaying old posts (can see at dashboard.

10. Reorganize the site so that document root is /var/www (default was /var/www/html)

10.1 Tuning apache2:

10.1.1 at /etc/apache2/sites-available: create debian-yu.conf in which:

DocumentRoot /var/www

10.1.2 a2ensite debian-yu; a2dissite 000-default; service apache2 reload;

10.1.3  prepare /var/www/kblog ( cp -R /var/www/html/kblog /var/www; rm -R /var/www/html/kblog;

11.  Additionally, modify  index.php in the /var/www/index.php so that it includes:

require( dirname( __FILE__ ) . ‘/kblog/wp-blog-header.php’ );

12. Now both visiting localhost, visiting localhost/kblog work fine.