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.
Download WordPress
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/
Using MySQL
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
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 6 to server
version: 4.0.24_Debian-10sarge1-log
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)
mysql> EXIT
Bye
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 ** //
define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpress');
define('DB_PASSWORD', 'wordpresspassword');
define('DB_HOST', 'localhost');
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

I like you style of tutorial. I’m an absolute beginner when it comes to linux/debian/ubuntu so obviously I have some questions like:
Will this tutorial word for a newer version of Ubuntu Server like 6.10?
Also, pertaining to your tutorial, I am unsure of what I’m supposed to do when you use a quotation mark (‘ or “). Are we’re supposed to leave the string untouched, or does that indicate that we’re supposed to supply our own personal information? Then, are we to leave the quotes or remove them?
For example, when I see:
am I supposed to enter my personal information, for lets say, ‘localhost’? Should I leave the quotes?
yes, think you do need to leave the ‘ in localhost
Hi Bill, Thanks for your feedback. I will make this tutorial for Ubuntu
Hi, Travis, Thanks for your help
Thanks supriyadisw, I’m sure a lot of other people would find it useful.
I am trying to set this up as a dev site aand everything went find only I cant seem to find the the /wordpress/folder on my server. ANy ideas?
Hi mike, where you download your wordpress file? What command you use to extract this file? Thanks
Hi there,
I am building a blog on rare, high paying and odd keywords, please visit
and have a look, also please suggest other keywords you think i should add
http://www.topmoneykeywords.info
many thanks
Great tutorial! But I got all the way to the end successfully, and then ran into a problem. When I tried to import my Movable Type posts from my old blog (the address above–I’m playing with WordPress on my local server before trying it for real on my hosting service), I got the following message.
Unable to create directory /var/www/blog/wp-content/uploads/2007/01. Is its parent directory writable by the server?
I am a complete newbie to Ubuntu (two days old), and although I was able to figure out how to use mysql from the command line, I don’t know where to start with this problem.
Any pointers you can give me would be much appreciated.
Thanks!
Hi dave, welcome to Ubuntu
You should change wp-content permission. For deployment you can try this command:
cd /var/www/blog
sudo chown -Rf www-data: wp-content
or you can try this:
cd /var/www/blog
sudo chmod -Rf 777 wp-content
Gud lak!
When I try to upload images I get this error: Unable to create directory /var/www/blog/wp-content/uploads/2007/07. Is its parent directory writable by the server?
How can I do? I know I should change wp-content permission, but how?
Nice articles, helped me a lot thanks.
Maria: To change wp-content permission please use these commands
cd /var/www/blog
sudo chown -Rf www-data: wp-content
Or
cd /var/www/blog
sudo chmod -Rf 7777 wp-content
Gud lak!
ciiip…. mo coba dl a….thx bwgd infonx
wordpress is very good script.Thanks and im debian user.
thanks great job.
wordpress is very good script.Thanks and im debian user.
content/uploads/2007/07. Is its parent directory writable by the server?
directory writable by the server?
// ** MySQL settings ** //
define(’DB_NAME’, ‘wordpress’);
define(’DB_USER’, ‘wordpress’);
define(’DB_PASSWORD’, ‘wordpresspassword’);
define(’DB_HOST’, ‘localhost’);
localhost or your host ip or servername
thanks for the info…but to bad
word press does not seem to be working
for me for the past two days.
They might be down
nice articles!
gooood thanks
I’m trying to install WordPress on a remote server machine, but when I open a php file into my browser from the server, appears only the code. I’ve MySQL installed and runned, and I ran the creation database too. So, in every case, only the code appears on screen, for every php file. What’s wrong?
luigi,
i think you don’t have php installed on your system!
I solved, php was installed but not activated in file configuration (I uncommented some strings).
Thanks anyway.
Thanks a lot, mate, too bad I found your tutorial after I spent 5+ hours trying to make LAMP work on my Hardy Heron… Finally I managed to get it rolling – and found your page while searching for a solution for the chmod thingie. Thanks a lot!
????????
? ???? ? ???? ????????? ???????????, ???? ? ?? ?? ???? ?????
?????? ?????????? ???? ????? ???????? ?????? ?????. ???????? ??????? ??????, ??? ??????.
???????
????? ???????
install phpmyadmin. it makes it a lot easier to install databases on mysql.
i think so wP wery good cms system but very low seo boot
thanks
i think you don’t have php installed on your system!
wordpress is nice cms
install phpmyadmin. it makes it a lot easier to install databases on mysql.
thanks for the info…but to bad
word press does not seem to be working
for me for the past two days.
They might be down
wordpress is very good script.Thanks and im debian user.
i done every step without any hiccups but when i got to the install through the web browser i get “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.” how do i fix this i’m using Debian Server