After running websites for over a decade now, I’ve learned it’s always nice to have a backup (or three). Sure, you can download your files every now and then, but chances are they won’t be 100% current. A few months back I decided to look into backing up WordPress sites to Amazon’s S3 service. It took a bit of research, some SSH, and some PHP coding, but I’ve had a nice workable solution up and running for a while now.

While planning to move a site to a new server, I thought I’d try to restore from one of these backups. Surely downloading and uploading 4 TAR files would be easier than downloading/uploading thousands of files and images. It was, but there was a bit of trial and error.

In an effort to speed up the process, should I ever need to restore a crashed site, I’m going to document the process here.

1. First of all, I had to download all the necessary files from my Amazon S3 account. This was basically the httpdocs folder, plus the MySQL.

2. Next, upload the files to the root web directory.

3. SSH into the site and navigate to the root of the site.

4. Combine the files, which have been split into 300MB chunks, using the ‘cat’ command. The filenames should resemble httpdocs_date.tar.gz.p00, httpdocs_date.tar.gz.p01, etc. The syntax looks like this:

cat httpdocs* > filename.tar.gz

That will combine all parts into one file named filename.tar.gz

5. Decompress the GZipped file using:

gzip -d filename.tar.gz

and then decompress the TAR file using:

tar -xvf filename.tar

6. That should restore all the files to the httpdocs directory. There’s one last thing you may need to do. You might have to change the owner of the httpdocs directory using the chown command, like this:

chown -R USERNAME httpdocs

That will let the public see the files once the database is restored (that’s a topic for another post).

The Google Font Directory lets you browse all the fonts available via the Google Font API. All fonts in the directory are available for use on your website under an open source license and served by Google servers.

View font details to get the code needed to embed the font on your web site. Please also visit our quick start guide and FAQ page. For more help and suggestions, use our moderator page

Use web fonts on your site with just a few lines of code – and Google hosts the font for you. Much easier than SIFR or any other method that’s previously been available – and it works on IE6.

Posted via web from Phillip Duncan’s posterous

Similar to how 2.3 overhauled the tagging, category and classification system, version 2.5 of WordPress will overhaul the admin area.

More than just a visual overhaul (which was needed), WordPress 2.5 will feature better admin functionality and an improved user interface thanks in part to Happy Cog.

There’s a nice article on WordPress.org detailing the work that went into the new Admin interface. Check it out.

The features that worry me the most are:

  • Multi-file uploads.
  • New “Media Manager” for images, audio, video, etc.
  • Built-in gallery function.
  • Built-in (and pluggable) Gravatars support.
  • I’ve achieved all of those using plug-ins and custom PHP files. Seeing that list of features makes me wonder how it will affect my plugins and if I’ll need to re-do several sites to support the “out-of-the-box” features to stay compatible with WP 2.5.

    Why, Microsoft, why? That’s all I ask. Why must you continue to introduce proprietary technology in Internet Explorer?

    Internet Explorer 8 Beta is now available for download and one of the new features is WebSlices. By adding a few specific class names to content blocks, IE will essentially syndicate the content.

    <code><div class=”hslice” id=”1”>
      <p class=”entry-title”>item – $66.00</p>
      <div class=”entry-content”>high bidder:buyer1
        …
      </div>
    </div>

    Using the above classes will generate content the user (or IE8 user) can subscribe too. Why not RSS? Is it because that’s compatible with other software, browsers, and readers. Microsoft wanted something that would just work for Internet Explorer.

    Do they honestly thing any developer will support or use this? Hmm… let’s see… I can create a RSS feed for my content that anyone can use (even IE7 and IE8 users) or I can create the WebSlice just for IE8 users. The only use this will get will be from FrontPage/Expression users who do not know any better.

    Even Microsoft says it’s just like RSS on their site:

    WebSlices behave just like feeds where clients can subscribe to get updates and notify the user of changes.

    Please Microsoft, just make a good, fast browser for people to use. I was willing to admit IE7 was a step in the right direction. It’s fast and renders content relatively well and has good CSS support. It was only a matter of time before they had to go and ruin it.

    I’ve finally deployed the DotNetNuke site I’ve been working on. After deployment is when the most obvious things pop up.

    For instance, in DotNetNuke when you search for something in the site it will return a list of links to what it finds. What it won’t do is display something friendly like “No Search Results Found” if it doesn’t find anything. Dumb and not very user friendly.

    I did find what I thought would be the solution at ecktwo, but it didn’t work in Firefox due to the

    document.getElementById("search").innerHTML

    which doesn’t work in Firefox within a table, which is what the Search Results are generated using the ASP.NET grid view. So, I thought I’d take a stab at building something that worked for both IE and Firefox.

    Make a copy of your admin\Search\SearchResults.ascx file and then open the file in notepad. Apply the following code that I’ve highlighted in red:

    <%@ Control Language=”vb” AutoEventWireup=”false” Explicit=”True” Inherits=”DotNetNuke.Modules.SearchResults.SearchResults” CodeFile=”SearchResults.ascx.vb” %>

    <asp:Datagrid id=”dgResults” runat=”server” AutoGenerateColumns=”False” AllowPaging=”True” BorderStyle=”None”
    PagerStyle-CssClass=”NormalBold” ShowHeader=”False” CellPadding=”4″ GridLines=”None”>
    <Columns>
    <asp:TemplateColumn>
    <ItemTemplate>
    <asp:Label id=lblNo runat=”server” Text='<%# DataBinder.Eval(Container, “ItemIndex”) + 1 %>’ CssClass=”SubHead”>
    </asp:Label>
    </ItemTemplate>
    </asp:TemplateColumn>
    <asp:TemplateColumn>
    <ItemTemplate>
    <asp:HyperLink id=”lnkTitle” runat=”server” Name=”result” CssClass=”SubHead” NavigateUrl='<%# FormatURL(DataBinder.Eval(Container.DataItem,”TabId”),
    DataBinder.Eval(Container.DataItem,”Guid”)) %>’ Text='<%# DataBinder.Eval(Container.DataItem, “Title”) %>’>
    </asp:HyperLink>&nbsp;-
    <asp:Label id=”lblRelevance” runat=”server” CssClass=”Normal” Text='<%# FormatRelevance(DataBinder.Eval(Container.DataItem, “Relevance”)) %>’ >
    </asp:Label><BR>
    <asp:Label id=”lblSummary” runat=”server” CssClass=”Normal” Text='<%# DataBinder.Eval(Container.DataItem, “Description”) + “<br>” %>’ Visible=”<%# ShowDescription() %>”>
    </asp:Label>
    <asp:HyperLink id=”lnkLink” runat=”server” CssClass=”CommandButton” NavigateUrl='<%# FormatURL(DataBinder.Eval(Container.DataItem,”TabId”),
    DataBinder.Eval(Container.DataItem,”Guid”)) %>’ Text='<%# FormatURL(DataBinder.Eval(Container.DataItem,”TabId”),
    DataBinder.Eval(Container.DataItem,”Guid”)) %>’>
    </asp:HyperLink>&nbsp;-
    <asp:Label id=”lblPubDate” runat=”server” CssClass=”Normal” Text='<%# FormatDate(DataBinder.Eval(Container.DataItem, “PubDate”)) %>’>
    </asp:Label>
    </ItemTemplate>
    </asp:TemplateColumn>
    </Columns>
    <PagerStyle CssClass=”NormalBold” Mode=”NumericPages”></PagerStyle>
    </asp:Datagrid>

    <div id=”NoResults”>
    <h3 class=”red” style=”text-align:center”>No Search Results Found</h3>
    </div>
    <script language =”Javascript”>
    var search;
    search = document.getElementsByName(“result”);

    if (search.length == 0) {
    document.getElementById(“NoResults”).style.display=’block’;
    }
    else {
    document.getElementById(“NoResults”).style.display=’none’;
    }
    </script>

    Be sure to add the Name=”result” snippet to the asp:Hyperlink in the code above. It’s easy to miss.

    Save that and you should now have a spiffy new message displayed when no results are found. Use whatever CSS you want to style the message.