Main Menu

Categories

Subscribe

Wordpress to WPMU Conversion

February 8th, 2010

So I just finished installing and converting this site to WPMU, mainly to test it out and delve deeper into wordpress.

The migration from the old site to the new, went remarkably smooth and the site was only down for about 5 minutes which I class as a big success (Also, I’m sure my method is not the most elegant). Because of the fact that Wordpress and WMPU share 99% of the same codebase, the conversion was painless.

I am going to briefly explain how I did it.

Step 1 – Backup

Backup, Backup, Backup!

Using ftp, everything was backed up, as in the complete installation and all sub directories of the existing wordpress installation. Then I dumped the entire mysql database for keithdonegan.com. Now if we bodge it up, it doesn’t really matter, we have the most important thing, our data.

Step 2 – Download

Download WPMU and overwrite all existing wordpress files and folders. Now delete the .htaccess and wp-config.php files. Pop over into the browser and refresh your site. You should now see an install screen. (Note: my site is for personal use and gets only a few visitors, so If your site is big and gets alot of traffic, put up a blank index.php file to protect yourself against malicious users.) Fill in your database details as per your original wordrpess installation and log in. You should now have a working install of WMPU.

Step 3 – Migrate

So, we now have a spanky new WPMU install, pretty cool huh? Our next step is to migrate all of our old content into WMPU. While having a peek through PHPmyadmin, I see some new tables created by WMPU: wp_1_ etc. Keep a note of the these.

Now I select  the main tables which are below and export only these tables. Also, select the ‘Add DROP TABLE’ checkbox.

  • wp_comments
  • wp_commentmeta
  • wp_links
  • wp_postmeta
  • wp_posts
  • wp_terms
  • wp_term_relationships
  • wp_term_taxonomy

With the sql file, I open this in a text editor and begin to replace the old table names with the new ones.

For example. When fixing the wp_posts table for use with WPMU, I simply do a find and replace like so:

Find wp_posts Replace wp_1_posts and do this for all of the 8 tables above.

Step 4 – Patch

Wordpress MU adds a ‘/blog’ to your posts and removes the www from the url by default. If you have some content indexed in Google and don’t want to lose any traffic, there are 2 optional steps left.

Download and activate this plugin.

And add this to your .htaccess file to convert www traffic to the new non www url.

RewriteCond %{HTTP_HOST} !^keithdonegan\.com$
RewriteRule (.*) http://keithdonegan.com/$1 [R=301,L]

Now, you are done and have a Wordpress Mu installation, congrats!

Conclusion

As mentioned at the start of this post, this is most likely not the most elegant solution but It worked absolutely fine for me and should work for you too. Also, in regards to the media files, you can replace these permalinks in mysql and point them to the new files/ folder, but as this is a small site, I’m fine with my images pointing to my old wp_content folder.

No Comments

Update on Diet

February 3rd, 2010

I am trying to lose some weight and I am slowly turning my diet around and I do emphasize slowly. The start of 2010 is not going too badly, alot of people I bet would disagree, ahem but I’m happy where I’m at for the moment. January was really a tester month to get into the swing of things and towards the end of the month, my hunger for junk has diminished somewhat.

That junk food is being replaced with healthy foods such as hearty meals, cereal, fruit, vegetables, even bloody broccoli and some weight watcher snacks, oh and Coke Zero and plenty of water.

I am also going to start weighing myself every week on Monday as I am coming round to the fact that ‘if you can’t measure it you can’t manage it‘. So that will be fun :(

For my birthday I got an Amazon Gift Card and bought two recipe books:

I only just started using Ainsley’s book and made a cracking meal called Cajun chicken fillets with Spanish orange salad (below) and it was absolutely gorgeous. Looking forward to trying out more dishes form this excellent book!

So that’s really it, onward and upward.

No Comments

The Delete Operator in JavaScript

January 26th, 2010

The delete operator can delete a property of an object, array element or an undeclared variable.

var ob = { a:1, b:2 };
delete ob.b.

No Comments

Facebook Phishing Scam from ‘Linda’

January 17th, 2010

Below is a Facebook phishing scam that got into my inbox. On quick view It looks pretty legit and It almost got me. Good thing I have a habit of always looking at the address bar!

When clicked, the link brings you to:

http://facebook-reply.mountadamajani.com/html-h1.htm

Linda sent you a message.

(no subject)

Hi, have we met ever before? Linda

Thanks,
The Facebook Team

To reply to this message, follow the link below:
http://facebook-reply.mountadamajani.com/html-h1.htm

___
Find people from your Windows Live address book on Facebook! Go to:
http://www.facebook.com/find-friends/?ref=email

This message was intended for You. Want to control which emails you receive from
Facebook? Go to:
http://www.facebook.com/editaccount.php?notifications=1&mid=1328f55fN5898ds997b05695G38dd6G0
Facebook’s offices are located at 1601 S. California Ave., Palo Alto, CA 94304.

No Comments

The Heritage Golf & Spa Resort

January 16th, 2010

Address:

The Heritage,
Killenard,
Co. Laois

Contact Details:

Tel: 057 864 5500

Fax: 057 864 2350

Email: info@theheritage.com

Web: www.theheritage.com

No Comments

Castle Arms Hotel

January 16th, 2010

Address:

The Square,
Durrow,
Co. Laois

Contact Details:

Tel: 057 873 6117

Fax: 057 873 6566

Email: info@castlearmshotel.ie

Web: www.castlearmshotel.ie

No Comments

Paypal is Evil?, Yep pretty much

January 11th, 2010

If there is anyone out there that isn’t already aware of the terrible company that is Paypal, please read this. I’ve had some very bad experiences with Paypal so I just have to link to it.

No Comments

It’s oh so snowy

January 10th, 2010

We ventured out to the local park earlier today with the dogs, here are some pics.

No Comments

Thanks Sunlight Bingo! Nom Nom

January 7th, 2010

I received a lovely package from An Post on Christmas Eve from a client, Sunlight Bingo.

Now I did know there was something coming, but I didn’t think it would arrive so quick and it would be so bloody big! I also loved the note that was attached, very nice gesture and much appreciated!

So a BIG THANK YOU to Trevor over at Sunlight Bingo, the chocs were absolutely gorgeous and scoffed shortly after these pics were taken ;)

No Comments

MISSION!

January 5th, 2010

Interesting spin on the 419 scam I just received :)

Hi there,

How are you doing today? I am Kenneth Peterson, a US Marine currently serving in Iraq. I am actually one of the few

Marines remaining in Iraq. We are waiting for executive order for our next deployment to Afghanistan this new year.

I got your email from a business directory and I believe that you will maintain the level of confidence and trust

that this mission I am about to inform you of require. Several months ago, my unit discovered some abandoned cash

in the mansion of a militant ruler during a covert military raid. The total cash we discovered was $11.5 Million

USD. We stashed all the funds in one trunk box and moved it secretly out of Iraq to Kuwait for safekeeping. We

waited for several months to ensure that nobody is on our trail. Now, we need to move the money out of Kuwait. I am

contacting you because we need your assistance in receiving the box for us on our behalf, and securing the cash

until we return home from service. Please note that we cannot use any of our known relative or friend for this

mission because they are listed as acquaintance on our military file and this will compromise the covertness of

this mission. In order to proceed with this mission, we need the following details from you.

1. Your Full name

2. The address where you want the box to be delivered

3. Your private telephone number where you can be reached 24 hours

If for some reasons you don’t want to or can’t help us, I want you to delete this message immediately and assume we

never had this conversation. However, if you are going to fully cooperate with us in this transaction, we will

compensate you with 25% of the total cash after the mission is accomplished. Like I said earlier, we are a GO and

waiting for your response. This is a very serious deal and I wouldn’t be asking for your help if I am not convinced

that this is not going to bring any harm to you or your family, or put you in a risky position. We have worked the

kinks out and am very convinced this is gonna be successful.

Once we get a positive response from you with the info requested, we will proceed into the next step and I will

give you further instructions. I hope I can rely on your sense of discretion. Write back soon buddy. Wishing you a

prosperous new year.

In God we trust,

Ken

kenneth.peterson@infantry-marines.com

No Comments

Reading