Posts Tagged ‘wordpress’

Install And Upgrade Wordpress With Subversion

July 15th, 2008

In this tutorial I will walk you through the installation of Subversion on Ubuntu, if you have never used Subversion before then you will find this tutorial easy to follow. Perhaps you should read the Subversion entry at Wikipedia to find out more.

Like any good system administrator our first priority should be to update and upgrade before installing SVN.

sudo apt-get update
sudo apt-get upgrade

Let’s start by installing the Subversion package:

sudo apt-get install subversion

We need to create a central repository where our files will be stored. I chose /home/svn, Let’s use the svnadmin tool to create a path and set up the repository:

sudo svnadmin create /home/svn

Now create a group in order to enable access to the Subversion repository. Create a group named using the following command:

sudo addgroup svn

Now you add yourself to the newly group:

sudo adduser user_name svn

This step needs to be repeated when giving access to a new user to the repository. After you have added yourself to the group, log out and log in to verify that you are an active member of the group.

Now we need to enable access to the svn group and set the premissions to the repository.

sudo chgrp -R svn /home/svn
sudo chmod -R g+rws /home/svn

If you want to display information about the repository use the following command
svn info file:///home/svn

Well done, the reposity can be located at.

file:///home/svn

and

file://localhost/home/svn

For this tutorial all I need is local access.

Install Wordpress via SVN

I find that installing Wordpress via SVN is far easier in the long run, this becomes evident when upgrading the installation at a later time.

Overview of what we want to accomplish with SVN
We want to install the current version for WordPress, create a directory “blog” for your blog install and then check out (Subversion command “co”), or extract from the repository, the version of WordPress you have requested. Here are the commands.

First create a directory named “blog”.

mkdir blog

Move to the new directory.

cd blog

Have SVN get the current Wordpress release and create the installation directories.

$ svn co http://svn.automattic.com/wordpress/tags/2.5.1 .

Do not forget the period at the end of the SVN command it makes sure the downloaded files end in the current directory, not including the dot will result in a new installation directory.

After the download is complete, edit the wp-config.php with the required changes to complete the installation.

Update to a new release version

When the Wordpress team releases a new version an upgrade will be required. Because we now use SVN all we need to do is log in to the server and use the “Switch” command to switch to the new version.

cd blog
svn sw http://svn.automattic.com/wordpress/tags/2.5.1/

The beautiful part of this process is that all custom and privately owned files will be left intact (example themes, plugins).
Run the usual wp-admin/upgrade.php to finish the upgrade.

TIP

Browse http://svn.automattic.com/wordpress/tags , to find all the versions of WordPress.

Issuing two commands in order to set the automated upgrade process cuts down the amount of time and effort put into maintaining Wordpress. I hope you find SVN to be efficient and easy for Wordpress installations and upgrades than downloading, extracting, and uploading.

How To Install Wordpress On Ubuntu 6.06 LTS

December 27th, 2007

My VPS is hosted with Slicehost running on 256MB of RAM, 10GB HD, and Ubuntu its all a miracle.

In this guide I will assume the server is freshly installed and you wish to set up Wordpress (can change). I don’t want to sound mean but securing and optimizing the box to use less processes is up to you after all we are running Linux get use to it .The server will run.

Apache2
PHP5
MySQL
PHPMYADMIN (makes things easy)
VSFTPD

wp

1. Basic Server install, this will install necessary and useful packages to run Wordpress.

The first step will be to update and upgrade the server using apt-get, failure to update and upgrade will result in LAMP not installing.

$sudo apt-get update
$sudo apt-get upgrade

The next step will be installing LAMP using apt-get. The beauty of this step is in bringing together different modules and reducing the time spend on each component.

$sudo apt-get install mysql-server mysql-admin apache2 php5 libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql phpmyadmin

After the install of LAMP is complete we need to set the root password for MySQL. For your own safety try to make the password long and difficult.

$sudo mysqladmin -u root password newrootsqlpassword

When the root password is set restart MySQL.

$/etc/init.d/mysql restart

We need a way to get our files to the server after the blog install, the solution is VSFTP very easy to configure use Google if you need further help.

$sudo apt-get install vsftpd

2. Setting up the webserver for Wordpress.

I hope that you have an understanding of the Linux file system (not necessary but it helps), on our home directory we are going to create a series of folders for logs, public data, private data, cgi, backup and one VirtualHost file for our domain. The domain will be phxcore.info and username demo.

1. In the home directory we create a folder dedicated to hosting our site file.

$mkdir public_html

2.A series of folders will be create to host logs, backups, public files, etcetera.

$mkdir -p public_html/phxcore.info/{public,private,logs,cgi-bin,backup}

3. For basic testing of the webserver we create a simple .html file in the public folder using the nano editor.

$nano public_html/phxcore.info/public/index.html

VirtualHosts are pretty cool they allow you to run multiple sites from one server, we need to create one for our site phxcore.info.

$sudo nano /etc/apache2/sites-available/phxcore.info

After the nano opens the new files copy and paste the text below change as you see fit for your site.

# Try to place notes here, they are useful later

# domain: phxcore.info
# public: /home/demo/public_html/phxcore.info/

# Admin email, Server Name (domain name) and any aliases
ServerAdmin demo@phxcore.info
ServerName phxcore.info
ServerAlias www.phxcore.info

# Index file and Document Root (where the public files are located)
DirectoryIndex index.php
DocumentRoot /home/ldemo/public_html/phxcore.info/public

# Custom log file locations
LogLevel warn
ErrorLog /home/demo/public_html/phxcore.info/logs/error.log
CustomLog /home/demo/public_html/phxcore.info/logs/access.log combined

The text has been pasted in our VirtualHost file, lets activate our website phxcore.info using. To disable a site use “a2dissite”.

$sudo a2ensite phxcore.info

Lets restart Apache.

$sudo /etc/init.d/apache2 reload

3. Lets install Wordpress.

Now lets download Wordpress using the wget command.

$wget http://wordpress.org/latest.tar.gz

Then unzip
$tar -xzvf latest.tar.gz

The contents have been uncrompressed and a directory named Wordpress has been created.

I will now direct you to the official Wordpress website they provide instructions on how to use PHPMYADMIN to create a database using MySQL.

http://codex.wordpress.org/Installing_WordPress#Using_phpMyAdmin

After the database is set I recommend you keep reading the remaining instructions on their website.

http://codex.wordpress.org/Installing_WordPress#Detailed_Instructions

Step 3: Set up wp-config.php
Step 4: Place the files
Step 5: Run the Install Script

This set of instructions has help me set up Wordpress on my server, you will have to make some changes to fit you configuration.

Good Luck.