Introduction
This article demonstrates how to make a WordPress Setup Using Raspberry Pi 3 and PHP.
Pi can handle a web server; so if you want to launch your own WordPress blogs with a proper back-end, you can easily do it. This web server is used to get a small amount of traffic and for development purposes.
Requirement
I used the following equipment for this Raspberry Pi web server article.
- Raspberry Pi 3
- Minimum 8GB SD Cord if you're using Raspberry Pi 3
- Ethernet or Wifi
- Putty
- VNC Viewer
Optional
Installation
First, we will need to install an Apache2 web server. Just use the following commands.
- sudo apt-get install apache2 -y
If you don't know the IP address, you can enter the following command line.
Open Browser, Enter IP address in the browser, and you should get an Apache instruction page.
Next, we need to install MYSQL - SERVER PHP 7.0. Just use the following commands.
- sudo apt-get install MySQL-server php7.0-mysql -y
- sudo mysql_secure_installation
Next, go to Configure MySQL server and now configure the password.
- We will need to download and extract the WordPress package.
- cd /var/www/html
- sudo chown pi: .
- rm *
- wget http:
- tar xzf latest.tar.gz
- mv wordpress/* ./
- rm -rf wordpress latest.tar.gz
- rm -rf index.html
- sudo chown -R -f www-data:www-data /var/www/html
- Restart Apache otherwise you will get an error that PHP is missing the MYSQL module.
- sudo service apache2 restart
- Now that that's installed we will need to set up a database to connect, use the -u for the username, and -p flag for the password. Leave no space b/w the flag and required text.
- sudo mysql -uroot -password
- Now create the new DB for this WordPress.
- create database wordpress;
You should now see the success statement. "Query OK, 1 row affected (0.00)"
Now let's exit the MySQL prompt by pressing Ctrl + D.
Now, in a browser go to the IP address, and you should be presented with a WordPress setup screen.
- Database Name : wordpress
- User Name : wpdb
- Password : (Your Password)
- Database Host : localhost
- Table Prefix : wp_
Next, go to the PHP editor page and then change the code.
Welcome Screen for WordPress
Welcome to the famous five-minute WordPress installation process. Just fill in the information.
Just enter your username and password
Pi server might not work too well due to the limited resources available to Pi.
Finally, we have successfully created a WordPress Set using Pi and PHP.