Install WordPress on OrangePi Plus

Recently I have decided to move all my website  editing on local computer and publish the final version only when pages are ready.

A year ago I bought OrangePi Plus and want to use this small credit card size computer as a hardware platform for WordPress. Below there are all steps starting from Linux installation on the board and finishing with publishing first page on the WordPress.

What is an OrangePI? It is a computer designed to be a clone of RaspberryPi but at the end has almost nothing common with it. I would say OrandePi is just another platform for learning.

But it has many variations and low price. So it can fit to many applications use Linux or Android as operating system. It also good for our task to run Apache2 Server and WordPress.

Let’s start

    1. Download and prepare image from http://www.armbian.com/download/   My board is OrangePi Plus and I don’t need desktop version with GUI, Server Debian Jessie will do the job. All work will be done using Terminal. Use 7zip to unzip downloaded image to extract file with .img extension.
    2. Prepare SD card (Class10 preferable) using SDFormater to format the card and Win32DiskImager to write image on the card. Procedure is simple and described many times on the YouTube. On the SDFormatter click on option and choose FORMAT SIZE ADJUSTMENT => ON. It will remove all partitions on the card and will use all available space to format.
    3. Insert card into OrangePi Plus card reader and connect 5V power. You don’t need to press any buttons. Wait ~2-3min to make sure operating system is loaded and ready for operation.
    4. Connect Ethernet cable to the OrangePi and find on your router’s DHCP table IP address assigned to the OrangePi Plus.
    5. If you have SSH client PUTTY installed then run it, if not, download and install it.
    6. Run PUTTY, type OrangePi IP address into Host Name (192.168.1.39 in my case), select SSH below (selected by default), click open to connect.
    7. On the first time Warning message notify you that there is no registered rsa2 key for your board and offers to use new key. Click on “Yes” to continue.
    8. Login as “root” with default password “1234”, it can take a minute or two to show first “Welcome Screen”.
    9. Please note “Usage of /:  82% of 1.2G” . On the first boot Linux is loaded from image on the card which has minimum size (1,2G). Message highlighted below in red notifies about resizing on the next boot. We don’t need to worry about extra steps how to utilize all space available on the SD card. I am using 32G card and would like to use all 32G for filesystem. Armbian will do it for me on the next boot automatically.
    10. Now it is time to create new password for user root, create a new user for future use. Simply follow instructions.
    11. Use new username which you will use on regular basis. I am using “gshop” as a new user name.
    12. Setup display resolution for future use. My monitor is old and supports 1024x768p.
    13. Next step is to reboot to apply all changes.

      Close PuTTY and open it again. Most likely IP address will be the same. If not, look at DHCP table on the router to find assigned IP address.
    14. Connect to the board, Login as root and use new password created on the steps above. Note that filesystem is extended and uses all space on the card.
    15. Now need to grant new user gshop the root privileges

      Find the line

      and add line below

      Press Ctrl+x to exit and Y to save.
    16. Let’s do some networking. It is good idea to use our server with the static IP address. nano /etc/network/interfaces Find section with eth0 interface (first one) and change the IP values according your network settings.
    17.  Cntr+x to exit and Y to save. Restart network
    18. If nothing comes than IP address was changed successfully. Close PuTTY and open again. Use new IP address to connect. To save time in future, type new IP on the Host Name field, type orangepi or whatever you like as a name of connection on Saved Sessions and press Save. Now new settings are saved under name orangepi. Next time simply click on orangepi in the list of Saved Sessions and click on Open to connect to the board. Because new IP, warning message to apply new key will show up. Click on “Yes” to continue. Login as root and reboot system with command: “reboot” or “shutdown -r now”

      Close PuTTY and open.  Login as user gshop or with the name which you use in step 11.
    19. Time to install a smart staff. Follow instructions and press Y and Enter when needed. MySQL will ask to create a Password for MySQL “root” user. Write down all user names/passwords to avoid troubles in future.
    20. How to setup MySQL. We will create database “wp01”, database user “wpuser@localhost” with password “wpdbpassword”
    21. Will install WordPress.
    22. WordPress is installed now in default folder where Apache Server will look for it. A little of setup:
    23. Find the place to change DB name, user and password and type wp01 as a DB_Name, wpuser as username and  wpdbpassword as password

      Cntr+x to exit and Y to save
    24. Let’s Apache know where to look for WordPress

      Ctrl+x to exit and Y to save
    25. Install MySQL replication and load balancing module for PHP and configure Apache user:
    26. Next step is to create and configure upload directory:
    27. We are close to finish. Let’s fix upload file size. Default is 2Mb, will increase to 64Mb :

      somewhere in the middle (section File Uploads) find: upload_max_filesize = 2M and change 2M on 64M or whatever you like/want. Ctrl+x to exit and Y to save.
    28. We are done. Open Internet browser and type 192.168.1.123 or your OrangePi static IP address. WordPress will come with Setup page to finish installation

I hope nothing was missing in my descriptions and process will take 20-30min to install WordPress on OrangePi Plus.

Comments are disables due to huge amount of spam.