Thursday, September 6, 2012

Installing WordPress on Ubuntu 12.04 (Server)

Installed WordPress on my Ubuntu 12.04 Server.

1. Resources


How To Install WordPress in Ubuntu Server 12.04 LTS



2. Requirements

You need LAMP Server (Appache, MySQL, PHP) to install WordPress.
See Installing LAMP Server on Ubuntu 12.04


3. Installation

I used Synaptic to install WordPress.
Just search for wordpress and install.

It installed the following packages:


vascript-common
libjs-cropper
libjs-prototype
libjs-scriptaculous
libphp-phpmailer
libphp-simplepie
libphp-snoopy
php5-curl
php5-gd
php5-intl
tinymce
wordpress
wordpress-l10n
wwwconfig-common

4. Check Installation


$ find / -name wordpress
...
/var/lib/wordpress
/usr/share/wordpress
/usr/share/doc/wordpress
...

$ ls /usr/share/wordpress/
index.php           wp-comments-post.php  wp-links-opml.php  wp-settings.php
readme.html         wp-config-sample.php  wp-load.php        wp-signup.php
wp-activate.php     wp-config.php         wp-login.php       wp-trackback.php
wp-admin            wp-content            wp-mail.php        xmlrpc.php
wp-app.php          wp-cron.php           wp-pass.php
wp-blog-header.php  wp-includes           wp-register.php


5. Create a Symbolic Link of WP folder in Appache Document Root

$ sudo ln -s /usr/share/wordpress /var/www/wp



6. Run Setup program

Find a setup program.


$ ls /usr/share/doc/wordpress/examples/
apache.conf  setup-mysql

Found it (setup-mysql). Let's run it.

I use "wordpress" for user name.
I use "localhost" for database name (same as URL)

$ sudo bash /usr/share/doc/wordpress/examples/setup-mysql  -n wordpress localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_req=1 ttl=64 time=0.083 ms
--- localhost ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.083/0.083/0.083/0.000 ms
/etc/wordpress/config-localhost.php written
Trying to create upload directory: /srv/www/wp-uploads/localhost
Setting up permissions
Goto http://localhost to setup Wordpress


6. Change Owner of WordPress folder [updated]


$ sudo chown -R www-data usr/share/wordpress


I had a problem installing a new plugin for wordpress, getting an error:
"Unable to locate WordPress Plugin directory."

Changing of owner of WordPress folder fixed the error.



7. Test

Go to: http//localhost/wp

There we have it!









No comments:

Post a Comment