This tutorial is how to install WordPress on Debian Linux. Installing WordPress on Debian? What for? Are there many easy ways to install WordPress on our server (Web hosting)? Eventually, We don’t need to know what distro that our server use or what operating system is. You right.
I have a “special” condition here. I need to install WordPress on my own Debian server for testing purpose. If You like me, play around with WordPress as a developer (perhaps you create your own theme or plugin), you should have your own server in your local PC on LAN.
You can use your own server to test your own WordPress theme or plugin before you release it. You can upload and test your theme or plugin directly on your remote server of course, but if you have a little problem with Internet connection (just like me), it is so hard way 😀
These are my little steps to built my WordPress theme or plugin:
- Built on my local PC
- Upload to my local server
- Testing my work and make sure works propertly
- Upload to my remote server
- Testing again in the “real” condition
- Make sure I have no problem with my work
- Sharing my work
Let’s start to install WorPress on Debian
Installing http server on Debian
You can see my tutorial how to install http server on Debian, Installing HTTP Server on Debian.
Installing MySQL Database
You can see my tutorial how to install MySQL Database Server on Debian.
You can download WordPress from their official website.
Upload your WordPress archieve into your debian server
You can use any ftp tools to upload your WordPress archieve into your server.
Extract your WordPress archieve into your server directory
tar zxvf wordpress-x.x.x.tar.gz --directory=/var/www/
Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.
mysql -u ''adminusername'' -p
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 6 to server
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> CREATE DATABASE ''wordpress'';
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'wordpress'@'localhost'
-> IDENTIFIED BY 'wordpresspassword' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
In the above:
- adminusername will typically be root, unless you have another high-privileged account set up.
- wordpress or blog are good values for databasename.
- wordpress is a good value for wordpressusername.
- hostname will usually be localhost. If you don’t know what this value should be, check with your system administrator. If you are the system administrator, figure out what this value should be.
- password should be a difficult-to-guess password, ideally containing a combination of upper- and lower-case letters, numbers, and symbols.
Write down the values you used for databasename, wordpressusername, hostname, and password.
Configure your WordPress setting
Rename the wp-config-sample.php file to wp-config.php. Open and edit wp-config.php file
// ** MySQL settings ** //
Run the Install Script
Using your favorite web browser, visit wp-admin/install.php within the directory into which you just installed WordPress on your web site. For example: point your browser to http://yourserver/wordpress/wp-admin/install.php.
Preview your WordPress
Point your browser to http://yourserver/wordpress.
Well done! You have your own WordPress on Your Debian Server.
😀 Gud lak