Have you ever dreamed about becoming a professional blogger? Do you sit at your desk job thinking about all of the information that you know and want to share it with the world? Do you have a business idea and want to put together a clean, easy-to-navigate website, without having to pay someone $$$? Search no more, your solution is here.
Meet WordPress and Raspberry Pi
You’ve probably heard about WordPress. It’s a powerful out-of-the-box platform that allows you to create a website quickly and conveniently. WordPress is know for it’s famous 5-minute set up and provides a rich feature set including a built in media library, blogging platform, and static webpages.
This little beauty is one of the smallest computers on the market that is packed with features. You can pick up a Pi for $35 and be on your way to hosting a web server in no time. Don’t forget the memory card.
- That you have a Raspberry Pi with Rasbian OS
- That you are familiar with command line tools
Let’s get started
Login to your Raspberry Pi and launch a Terminal.
We’ll first install Apache which is the webserver. We will then install PHP and MySQL which will allow us to use WordPress. Type the following commands one at a time:
sudo apt-get update
sudo apt-get install apache2 -y
sudo apt-get install php -y
sudo apt-get install mysql-server php-mysql -y
sudo service apache2 restart
sudo rm *
sudo wget http://wordpress.org/latest.tar.gz
sudo tar xzf latest.tar.gz
sudo mv wordpress/* .
sudo rm -rf wordpress latest.tar.gz
sudo chown -R www-data: .
Next, let’s set up the database (MySQL) so that WordPress can create the appropriate tables and entries:
1. sudo mysql_secure_installation
2. Current password (enter for none): Enter
3. Set root password: Y
4. New password: <-- You will need this when setting up WordPress
5. Remove anonymous users: Y
6. Disallow root login remotely: Y
7. Remove test database and access to it: Y
8. Reload privilege tables now: Y
9. sudo mysql -uroot -p
10. create database wordpress;
11. GRANT ALL PRIVILEGES ON wordpress.* TO 'root'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
12. FLUSH PRIVILEGES;
13. Exit MariaDB with Ctrl + D
Set up WordPress by opening up a browser on the Raspberry Pi and going to http://localhost. Click Let’s Go fill in the basics. Click Submit
. Click Run the install.
Once installed navigate to the admin dashboard by going to http://localhost/wp-admin.
Once in the WordPress dashboard you can create blog posts, static pages, or upload your favorite cat memes. In the coming post we’ll talk about how you can make your blog public, to the WORLD!