WordPress on Debian Linux

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 :D

These are my little steps to built my WordPress theme or plugin:

  1. Built on my local PC
  2. Upload to my local server
  3. Testing my work and make sure works propertly
  4. Upload to my remote server
  5. Testing again in the “real” condition
  6. Make sure I have no problem with my work
  7. 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.

:D Gud lak

Share and Enjoy:

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • BlinkList
  • co.mments
  • del.icio.us
  • digg
  • DZone
  • Furl
  • Ma.gnolia
  • NewsVine
  • RawSugar
  • Reddit
  • Shadows
  • Simpy
  • Slashdot
  • Spurl
  • StumbleUpon
  • Technorati
  • YahooMyWeb
 

Related Posts


24 Responses to “WordPress on Debian Linux”  

  1. a gravatar 1 Bill

    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:

    // ** MySQL settings ** //
    define(’DB_NAME’, ‘wordpress’);
    define(’DB_USER’, ‘wordpress’);
    define(’DB_PASSWORD’, ‘wordpresspassword’);
    define(’DB_HOST’, ‘localhost’);

    am I supposed to enter my personal information, for lets say, ‘localhost’? Should I leave the quotes?

  2. a gravatar 2 travis

    yes, think you do need to leave the ‘ in localhost

  3. a gravatar 3 supriyadisw

    Hi Bill, Thanks for your feedback. I will make this tutorial for Ubuntu ;)
    Hi, Travis, Thanks for your help :D

  4. a gravatar 4 Bill

    Thanks supriyadisw, I’m sure a lot of other people would find it useful.

  5. a gravatar 5 Mike

    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?

  6. a gravatar 6 supriyadisw

    Hi mike, where you download your wordpress file? What command you use to extract this file? Thanks

  7. a gravatar 7 non stick cookware

    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

  8. a gravatar 8 Dave Trowbridge

    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!

  9. a gravatar 9 supriyadisw

    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!

  10. a gravatar 10 Maria

    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?

  11. a gravatar 11 Deva

    Nice articles, helped me a lot thanks.

  12. a gravatar 12 supriyadisw

    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!

  13. a gravatar 13 rizoa

    ciiip…. mo coba dl a….thx bwgd infonx

  14. a gravatar 14 reklam

    wordpress is very good script.Thanks and im debian user.

  15. a gravatar 15 Alarm

    thanks great job.

  16. a gravatar 16 holigan

    wordpress is very good script.Thanks and im debian user.

  17. a gravatar 17 google reklam

    content/uploads/2007/07. Is its parent directory writable by the server?

  18. a gravatar 18 google reklam

    directory writable by the server?

  19. a gravatar 19 nakliyat

    // ** 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

  20. a gravatar 20 Hostgator hosting

    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

  21. a gravatar 21 çiçekçi

    nice articles! :)

  1. 1 155 Wordpress Resources, Tutorials, Plugins, Themes, AJAX, Podcasting…WP Monster List | Speckyboy - Wordpress and Design
  2. 2 Installing WordPress « Klikvnet99’s Weblog
  3. 3 Installing WordPress
Posting Your Comment
Please Wait

Yes, leave a comment here!

There was an error with your comment, please try again.