Print Friendly, PDF & Email

Difficulty level: Beginner

Approx reading time:

Components Required:

1. Raspberry Pi 3 model B

2. MicroSD card 8 or 16 GB (Class 4 and above) with Raspbian Jessie

3. Windows PC / Linux PC (Tested on Windows 10, Ubuntu 14.04 LTS)

4. Ethernet cable (Category 5 – also called Cat 5)

5. Micro USB cable

Way to go ->

1. Login to your Pi using PuTTy or your Ubuntu terminal.

2. Login to your Pi GUI using VNC server (Linux / Windows).

PHP installation and PHP file creation:

3. Run the following commands.

sudo apt-get install php5 libapache2-mod-php5 -y

cd /var/www/html

sudo nano index.php

6. In the file:

<?php echo “Hello World”; ?>

7. Press Cntrl + X on your keyboard then press Y and finally Enter to save the file.

8. Delete the file index.html:

sudo rm index.html

9. Navigate to your webpage using your local IP address(steps 5 – 6 in RPi 3 Tutorial 15) to see Hello World written on it.

MySQL and WordPress installation:

10. In the terminal type:

sudo apt-get install mysql-server php5-mysql -y

11. Setup password for MySQL “root” user.

11_RepeatPass

12. In the terminal run the following commands:

sudo chown pi : .

sudo rm *

13. To download the latest WordPress version, in the terminal type:

wget http://wordpress.org/latest.tar.gz

14. Extract it: 

tar zxf latest.tar.gz
cd wordpress

cd ..

mv wordpress/*

18. Create MySQL database for WordPress. User: root, password:raspberry to login to the MySQL monitor.

mysql -uroot -praspberry

19. Beside this prompt: mysql>, type: 

create database wordpress;

and press Enter.

20. Press Cntrl + D on your keyboard to exit the MySQL monitor.

21. Reboot your Apache Server: 

sudo /etc/init.d/apache2 restart

22. Type in your IP address(from step 9) in your browser to go the installation screen.

22_WordpressWelcome

23. Click on Let’s go! And proceed to following screen to enter the details and click Submit.

23_LetsGo

24. Select everything inside the box and copy it.

24_CopyPaste

25. In the terminal create a new file: 

sudo nano wp-config.php

and right mouse click to paste the content that you copied in the previous step.

26. Press Cntrl + X on your keyboard then press Y and finally Enter to save the file.

27. Go back to the browser and click on Run the install.

28. Enter the Information needed and click on Install WordPress.

28_InstallWP

29. Click Log in.

29_WPSuccess

30. Enter username: root and password: raspberry to login.

31. Done! You have WordPress on your Pi.

31_WPOnPi

32. Before customizing your WordPress page, run the following command in your terminal.

sudo chown -R www-data:www-data /var/www/html

Read full tutorial at

Rating widget: