blog defaced for 40 minutes
This wasn’t anyone’s fault but my own (as I left Wordpress unpatched for a few months), but the other week, I found the blog had been replaced with the message ‘F### the Israeli’s’ and ‘you suck admin’.. etc. etc.
When the defacing occurred, for whatever reason (thankfully) wordpress sent me an email to say the admin user email address has changed. This was about 30-40 minutes before I got into work, so as soon as got to work, I was able to disable the site quickly and add a temporary message.
Anyway, I thought I’d post what I did to recover the blog, without loosing any date. If your doing this yourself, please note that this will definitely not fix all defacements, this is just a log of what I did to get things working again. Also you’ll need your ftp username & password, and access to your mysql server (i.e. via phpmyadmin or direct mysql access):
- The first thing to do, is disable the site whilst you perform the fixes. So rename your public_html folder to something else (so it can’t be accessed from the web to be re-defaced). In this example we’ll call it ‘public_html_stuffed’.
- Next, take a look in your uploads folder (public_html_stuffed/wp-content/uploads/) to see if there’s anything that was recently added to the site and looks suspicious. I found something called l_php.jpg which was actually ended up being some very cryptic php code if you open it up in an editor.
- Now take a look in your theme folder (public_html_stuffed/wp-content/themes/alexs-blog) to see if there’s anything there that has also recently changed. I found the index.php file here which had all the markup you would see when visiting the site. I just purged the whole folder to be on the safe side (we’ll fix this later).
- Next you want to download a copy of the latest wordpress installation from wordpress.org, unzip the contents and overwrite all the files in your public_html_stuffed folder with the new wordpress. This is to firstly upgrade to a safe version, but also to purge any system files that may have been altered by the crackers.
- Now for the database changes: goto the wp_users table and edit user 1 (the admin user). Make sure this users email address is your own, and if its been changed, set it back. Also set the password field to empty (don’t worry about this, it won’t let anyone log in with an empty password but we’ll fix it in a minute anyway).
- While we’re in the database, we’ll want to remove any new posts that look like they relate to the defacement – in my case, there was one post that mentioned the odd filename (l_php.jpg) I found in the uploads folder. So I simply deleted that row.
- We should be safe now to move the site back to being web accessible, so rename your public_html_stuffed back to public_html.
- Access the site’s admin login page and click the recover password link. Follow the instructions for resetting the admin user’s password.
- When in your admin, reset the theme, or download a new theme and set it to this (if you deleted it entirely). You’ll also want to make sure all your plugins are updated too! To be on the safe side I also re-ran the wordpress update via the update section of the admin area.
- Clear your browser cache, and then you should be done.
In the process of doing the fix to my blog, I’ve also changed my theme – did anyone notice? probably not!
Just a FYI: the wordpress version I was using when this all happened was 2.8.5 – so it was only 4 versions (6 months) since I updated.
There are literally over 4500 3rd party modules for Drupal. So how does one know which modules to use? Whilst the Acquia distribution of Drupal covers all the really common, well maintained and useful 3rd party modules there are still a few other important ones that it misses out that you may not know about. So what I’ve done below is list these out into categories, as well as talk a bit about why they are indeed so important. Note: these modules are targeted at general purpose/brochure sites.
Administration Modules
- Menu Settings per Content Type
When creating a node of any content types, the menu field will always be present. This module lets you enable/disable the menu field, as well as select which menu groups are selectable to a content type. - Better Formats
Greatly improves the ‘input filter’ features of textareas. - TinyMCE Node Picker
Adds a picker feature to TinyMCE for linking to internal pages. - Link Checker
Periodically checks content links to ensure they still work properly. - Vertical Tabs
Hides a lot of the really unnecessary system fields in node edit forms.
Front-end modules
- Menu Block
Allows you to create local menu blocks showing child items of the current page. - Site map
Provides a page view of the pages of the site in a hierarchical list.
SEO modules
- Global Redirect
When you have pathalias and pathauto on, the urls of your nodes look all pretty, but can still be accessed on the internal url, such as node/<node id>. If google finds you duplicating content on too many urls, they may water down the importance of the content. So what this module does is ensure the node views are only accessible on the pathalias url. - Nodewords
Whilst meta description and keywords are not so important now days, they still have a small place to play with the results pages for some search engines (like Yahoo). This module essentially allows you to set the meta description and keywords on a per node, per view basis. - PageTitle
Page Title simply allows you to set a custom title tag (used in head block of your markup) on a per node, per per view basis - XML Sitemaps
Automatically creates an xml sitemap to allow search engines to more intelligently index your site.
Other useful links
Europe Trip 2009 Summary/Tips
I’ve been back home for almost 4 weeks now, but am only just finding the time to write a bit of a summary of my partner (now fiancé!) and I’s first trip around Europe! Yes, I’m engaged! I’d be a pretty bad future husband if I didn’t mention this in the first paragraph, wouldn’t I! Still can’t believe it, but I’ll reveal the details to those who I know in person, sorry! This post is mainly about sharing the lessons (both the easy and hard ways) we learnt on our trip.
Below is an approximate route of our journey through Europe:
London, UK
Massive, vibrant, old/new, clean/dirty, efficient, relatively affordable! We stayed with my very hospitable cousin in East London (which despite the bad reputation for the area) seemed really safe, and convenient, since it was only a 10 min bus and 10 min tube ride to city centre. Tips as follows:
- Learning to navigate the various tubes lines is a requirement! They’re fast and regular, and theres stops near just about everything. Get yourself an Oyster card and add credit as needed, as it makes getting on and off, really easy. You’ll also want a tube map as well as a normal street map and use the indexes in both to work out the best route. The Bus system in London is also just as reliable – most come every 5 or 10 minutes, and have priority in the traffic too.
- If your a museum/sites type, and want to really absorb stuff, give yourself at least half a day for all the majors. There’s heaps of museum’s, but of the ones we visited: National History Museum and Westminister Abbey – we could have spent agers there if we had the time.
- Make sure to check out the London Eye, but don’t bother with the more expensive fast queue tickets, as the normal queue is pretty fast anyway. Also don’t miss the 4D cinema experience which comes free with all Eye tickets – don’t be afraid, its actually pretty entertaining!
- Other cool things to check out are the markets Covert Gardens. On a weekend they have all these street busker’s that are actually really entertaining. The London Transport Museum is here too, which isn’t too bad if you were obsessed with the tubes like us! Also check out the Harrods department store, and go to a Westend show, like the Lion King – was freaking fantastic (even if your non-theater type like me!).
Munich, Germany
Modern, well maintained, boozey!, beautiful, friendly! Tips as follows:
- Don’t be too worried about the language barrier – most Germans speak English! That’s of course if you can find locals. When we went (during Oktoberfest), there were heaps of other Australians there, so it was a really friendly environment. To be on the safe side just learn the basics, Thankyou very much, Sorry, etc.
- Oktoberfest is such a crazy festival, I’d never expected it to be so huge and so happy. The beer at Oktoberfest is specially brewed to have a higher alcohol content, so take all the normal precautions, i.e. remember to eat a decent meal before you start drinking the beer. We filled up on beer pretty quickly and didn’t last very long at all (only 3 Steins, whilst most people were doing 6-8 a day).
- Oktoberfest goes for 2 weeks, but if you want a no fuss drinking session, attend the event during the weekdays (Mon-Thur) and start around 1PM. If you get there later in the day, or if you go instead on weekends, you apparently won’t get in, due to all the table bookings. We went on a Tuesday at 12PM, and no trouble getting in to the main english tent Hofbräu-Festzelt and later that evening into the Löwenbräu-Festhalle!
- If visiting Munich for Oktoberfest, also allocate some time to do a few non-boozy things – the city has a lot of history from WW2, and the like. Check out the first Nazi Concentration camp: Dachau, King Ludwig’s 18th century Castle: Neuschwanstein Castle, and Marienplatz in the city centre. There’s heaps of other great things to do there, like bike tours to the Gardens, etc, but we didn’t get a chance to do that, unfortunately.
- For decent priced & tasting food, check out Augustina Brewery – we went there for dinner just about every night! It was conveniently across the road from our hostel: Meininger, which is also conveniently close to Oktoberfest.
Ossoppo, Italy
A small, quiet country town in the north east of Italy, about 3 hours drive from Venice. We got here, via a Trenitalia train direct from Munich to Trento station, which wasn’t too bad going through the alps and then a car ride to Ossoppo. We stayed here with Katrina’s Aunty and had a really relaxing rest away from the bustling cities. The homes in the Italian Country are really different to Australia – they have all the homes packed up next to one another and then the gardens & paddocks are all together next to each other down the road. Speaking of roads, the driving there is really slack, no one really indicates, and people rarely keep left on multi lane roads. I may sound a bit negative, but I don’t mean to be, the place was so quiet and friendly – everyone in the town knew everyone, and its surrounded by the beautiful Alp mountain range.
Venice, Italy
Canels, culture and history! When you step off the train, its all just hustle and bustle with tourists and dodgy sales people swarming everywhere. Tips:
- It’s definitely one of those cities you’ve got to see – but give yourself at least a few nights here. We only stayed 2 nights due to our busy schedule, and only started to settle in and relax the night before we left.
- If you want to get around the various islands yourself, get the 24 or 48 hour water bus passes, and hop on and off whenever you please. Get them from the vendors at any water bus stop. They also have combo deals with a pass to get into a bunch of museums pre-paid, so ask them about that too, to save a few Euro.
- Avoid the famous sites of St Marco square anytime before 11AM, because from this time onwards, it’s basically impossible to walk around without getting a few squashed toes or a few bumps and bruises (yes!).
- As mentioned, theres heaps of tourists around and a lot of them are 50+. So if you’re looking for a break, check out the Caffe Rossa, Santa Margherita to the south west of the islands. It’s a little walk away from the main tousty area, but its where all the 20-30 year old’s hang out and drink copious quantities of Campari in the form of a cocktail called a Spritz. For 2.20 Euro you can’t go wrong!
- Getting to and from the Venice airport: the quickest and cheapest way is via a bus. It’s something like a 2 zone trip (3-4 Euro) and only takes 15 minutes, rather then using a water taxi, or other transport.
Paris, France
Culture shock!
- If you’re visiting Paris, do your very best to learn a bit of French. ‘Parley vou Ongley’ and ‘Merci Bookoo’ were really not enough, you need to learn a few more lines then that.
- Like London, the city underground train system is fantastic. Get yourself a Navi-go card and again (like the Oyster card in London) add credit as needed, or get all-day zone 3 or 5 features added to the card. Get the Metro map and a decent street map too.
- If you’ve read The Davinci code or seen the movie, check out the Louvre of course, its really massive! The museum has heaps of different sections, but the one you probably want is the Italian Art section where has all of Davinci’s works and the like. If you’re a little clueless on the art scene like myself, grab an audio commentary device (although a bit pricey) they really help to make you understand the stories that these ancient paintings tell. Allocate at a bare minimum at least half a day to this place, as there really is a lot to absorb.
- Paris is quite expensive, so be prepared for it: 4 Euro coffee’s, and 115 Euro per night rates for a small room in the city – its really over the top. To keep costs down find the super markets and buy your meals there most of the time and then just splurge a little at a nice restaurant at least once.
- Tower Eiffel is freakin massive – I would have never thought. Avoid visiting around 7PM, because this is when the lines start going really slowly, as they let pre-booked guests of the restaurant jump the queue! It’s also worth paying the little bit extra to get access to the top floor – just do it, its amazing!
- Palace Versailles is also worth a visit. It’s where Napoleon use you to hang out, and its also where the WW2 peace treaty was signed. The palace has some great art, and the massive gardens surrounding it which can be explored with golf buggy’s (although we didn’t have time for this). It’s definitely a full day trip.
Amsterdam, Holland
This place rocks, and was a nice change from Paris.
- All dutch people speak English, so there’s basically zero language barrier. After trying to learn 3 languages in about 2 weeks, we really didn’t have any time or patience to learn another (Dutch is also apparently a lot harder then most other European languages).
- Check out the coffee shops, but apparently go easy on the space cakes – they take at least 40 minutes to kick in. If you’re one of those types that wants to try everything, they don’t sell Magic mushrooms there anymore (due to a recent controversies involving tourists) but they do sell the truffles (roots/stalks) of the mushrooms which apparently have the same effect. All at your own risk of course!
- With all the dodgy stuff that happens there in terms of drugs and prostitution, we actually felt really safe here. You can walk around at 1AM in the morning, and have nothing to worry about, because theres always people out and about (mostly being entertained themselves).
- The Heineken Museum is worth a visit, with 3 free beers included and another 4D cinema experience (they call it “brewing you”). The Vodka museum is also interesting, and only costs around $7 Euro.
- If staying at a hotel, checkout the tourist brochures and pamphlets at the front desk – they usually have discounts written on them for museum entry and souvenir shop purchases.
Southhampton, UK
We took an overnight visit down to Southhampton and hired a small vechicle from Europ car and visited the Stonehenges. You may say, its just a bunch of rocks, why would you waste all the time and money? I’d probably say the same thing about Wave Rock here in Western Australia, but I dunno, I really liked visiting the Stonehenges – there’s something about 4000 year old rocks that mysteriously came to rest from a place far far away. It was also a nice way to see the British country side. We stayed with Katrina’s Aunty in a small town out of Romney (near Southhampton) that not even the GPS could find – so don’t rely completely on these things – get a map too (any service station should have one)!. Another quick tip for hiring a car: with an Australian License, I had no trouble what so ever hiring the car in the UK, i.e. I didn’t need any sort of ‘international license’, so no fuss there.
General long haul Europe travel tips:
- Whenever landing in a new city, getting a decent map is critical! I’m not talking some free commercialized version, I mean paying 5-10 Euro to get one that actually has the street names on and comes with an Index. It saves a lot of hassle and headaches!
- The New Europe tours are really well worth it and the tour guides are extremely knowledgeable. We went on a total of 4 New Europe tours around Europe and of the 4 different tour guides, every single one of them were really friendly and had so many stories to share!
- When getting from one city to the next, investigate all forms of transport, be in plane, train, bus or ferry. In some cases, planes were cheaper, and other cases trains were. Kayak.com has a great system to search all the airlines for you. For trains, these differ for each country, and we found it best to book when you are actually at the origin – as the online systems seemed to always be more expensive (not sure if theres commissions there or something).
- Pack lite when you first leave, cause you’re going to bring a heap of crap back home for sure! Try save your present hunting until the last destination, but always pick up a few bits and pieces along the way, because you’ll never get a chance to get them again. The souvenirs you buy from dodgy looking street markets are often the cheapest, compared with proper shops or the airports.
- Have an open mind – and don’t show it if you get offended or upset! Your the tourist, so you should be offended but that’s what its all about, just don’t take it out on the locals.
Hopefully this tip list can help at least one budget traveller out there! Happy and Safe travels.
Upgrade Drupal from 5.x to 6.x
Continuing on from ‘Upgrading a Drupal 4.7.x site to 5.x’ below are some notes after upgrading the same install from 5.x to the latest 6.x version of Drupal. Most of what I did followed the instructions found in this screencast by greggles – watch it from start to finish, making notes where possible!
- For all 3rd party modules, first make sure a Drupal 6.x version exists! (if it doesn’t, see the next point).
- If you have any custom themes or modules you’ve developed, you’re going to need to re-write some parts of them. The quickest way to do this, is to install the coder module, which (when instructed) will scan your source code and tell you exactly what needs to be changed and directs you to the relevant section in the Drupal 6.x API changes doc. It’s a pretty sweet module and the documentation there rocks too!
- If the site you’re upgrading was at one stage version 4.x of Drupal, and you get an error in the initial run of update.php about “Unknown column ‘language’ in ‘where clause’” – this is normal, just manually correct the table, as per the following drupal.org thread: Upgrading from D5 -> D6 url_alias field errors prevent upgrade, manual bootstrap necessary.
- When you’ve finished re-writing your custom Drupal theme to be compatible with 6.x, make sure you Clear the Drupal internal cache, either from the menu option ‘Flush tables’ provided by the admin_menu module, or by truncating the contents of the cache_* tables.
- If you use the nice_menus module, and use a custom css file, you’ll need to reset the custom path location of the css file (set in Site Building->Themes->Configure->Global Settings).
- If you have some custom menu groups, by default they are set not to expand – if your themes were expecting them to show all the contents simply set them to expand via the Site Building->Menu’s section.
As you can see, it’s a lot easier upgrading from 5.x to 6.x then 4.x to 5.x!
So what’s next then? Drupal 7.0 of course! It’s due out in early 2010 and will feature major improvements in usability, automatic module updates, a fields api and much much more. The development version is due to be frozen in a week’s time, leaving a good 5-6 months of bug fixing (see webhick’s twitter profile – the honourably D7.0 co-maintainer). For more info about the 7.0 features, also checkout the D7UX.org website!
