<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>chris' random ramblings (Posts about wordpress)</title><link>https://atlee.ca/</link><description></description><atom:link href="https://atlee.ca/categories/wordpress.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Sat, 22 Feb 2025 20:04:32 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Upgraded to Wordpress 2.7</title><link>https://atlee.ca/posts/blog20090208upgraded-to-wordpress-27/</link><dc:creator>chris</dc:creator><description>&lt;p&gt;I just spent a few minutes upgrading my blog to wordpress 2.7.  Looks like everything went smoothly!  I did this upgrade with &lt;a href="https://atlee.ca/blog/2008/10/25/upgrading-wordpress-with-mercurial/"&gt;mercurial queues again&lt;/a&gt;.  Wordpress 2.7 is supposed to have better upgrade support built in, so I may not need mercurial for future upgrades.


Please let me know if you notice anything strange or missing since the upgrade. &lt;/p&gt;</description><category>blogging</category><category>general</category><category>technology</category><category>wordpress</category><guid>https://atlee.ca/posts/blog20090208upgraded-to-wordpress-27/</guid><pubDate>Sun, 08 Feb 2009 07:40:14 GMT</pubDate></item><item><title>Upgrading Wordpress with Mercurial</title><link>https://atlee.ca/posts/blog20081025upgrading-wordpress-with-mercurial/</link><dc:creator>chris</dc:creator><description>&lt;p&gt;Since &lt;a href="http://mozilla.com"&gt;Mozilla&lt;/a&gt; has started using &lt;a href="http://www.selenic.com/mercurial/wiki/"&gt;Mercurial&lt;/a&gt; for source control, I thought I shoud get some hands on experience with it.


My &lt;a href="http://wordpress.org"&gt;Wordpress&lt;/a&gt; dashboard has been nagging me to upgrade to the latest version for quite a while now.  I was running 2.5.1 up until today, which was released back in April.  I've been putting off upgrading because it's always such a pain if you follow the recommended instructions, and I inevitably end up forgetting to migrate some customization I made to the old version.



So, to kill two birds with one stone, I decided to try my hand at upgrading Wordpress by using Mercurial to track my changes to the default install, as well as the changes between versions of Wordpress.



&lt;strong&gt;Preparation:&lt;/strong&gt;

First, start off with a copy of my blog's code in a directory called 'blog'.

Download Wordpress 2.5.1 and 2.6.3 (the version I want to upgrade to).



&lt;strong&gt;Import initial Wordpress code:&lt;/strong&gt;

&lt;/p&gt;&lt;pre lang="bash"&gt;

tar zxf wordpress-2.5.1.tar.gz # NB: unpacks into wordpress/

mv wordpress wordpress-2.5.1

cd wordpress-2.5.1

hg init

hg commit -A -m 'wordpress 2.5.1'

cd ..

&lt;/pre&gt;



&lt;strong&gt;Apply my changes:&lt;/strong&gt;

&lt;pre lang="bash"&gt;

hg clone wordpress-2.5.1 wordpress-mine

cd wordpress-mine

hg qnew -m 'my blog' my-blog.patch

hg locate -0 | xargs -0 rm

cp -ar ../blog/* .

hg addremove

hg qrefresh

cd ..

&lt;/pre&gt;



The 'hg locate -0' line removes all the files currently tracked by Mercurial.  This is needed so that any files I deleted from my copy of Wordpress also are deleted in my Mercurial repository.



The result of these two steps is that I have a repository that has the original Wordpress source code as one revision, with my changes applied as a &lt;a href="http://hgbook.red-bean.com/hgbookch12.html"&gt;Mercurial Queue&lt;/a&gt; patch.



Now I need to tell Mercurial what's changed between versions 2.5.1 and 2.6.3.  To do this, I'll make a copy (or clone) of the 2.5.1 repository, and then put all the 2.6.3 files into it.  Again, I use 'hg locate -0 | xargs -0 rm' to delete all the files from the old version before copying the new files in.  Mercurial is smart enough to notice if files haven't changed, and the subsequent commit with the '-A' flag will add any new files or delete any files that were removed between 2.5.1 and 2.6.3.



&lt;strong&gt;Upgrade the pristine 2.5.1 to 2.6.3:&lt;/strong&gt;

&lt;pre lang="bash"&gt;

hg clone wordpress-2.5.1 wordpress-2.6.3

tar zxf wordpress-2.6.3 # NB: Unpacks into wordpress/

cd wordpress-2.6.3

hg locate -0 | xargs -0 rm

cp -ar ../wordpress/* .

hg commit -A -m 'wordpress-2.6.3'

cd ..

&lt;/pre&gt;



Now I need to perform the actual upgrade to my blog.  First I save the state of the current modifications, then pull in the 2.5.1 -&amp;gt; 2.6.3 changes from the wordpress-2.6.3 repository.  Then I reapply my changes to the new 2.6.3 code.



&lt;strong&gt;Pull in 2.6.3 to my blog:&lt;/strong&gt;

&lt;pre lang="bash"&gt;

cd wordpress-mine

hg qsave -e -c

hg pull ../wordpress-2.6.3

hg update -C

hg qpush -a -m

&lt;/pre&gt;



VoilÃ !  A quick rsync to my website, and the upgrade is complete!



I have to admit, I don't fully grok some of these Mercurial commands.  It took a few tries to work out this series of steps, so there's probably a better way of doing it.  I'm pretty happy overall though; I managed a successful Wordpress upgrade, and learned something about Mercurial in the process!  The next upgrade should go much more smoothly now that I've figured things out a bit better.</description><category>blogging</category><category>linux</category><category>technology</category><category>wordpress</category><guid>https://atlee.ca/posts/blog20081025upgrading-wordpress-with-mercurial/</guid><pubDate>Sun, 26 Oct 2008 02:36:00 GMT</pubDate></item><item><title>Mark Jaquith's Wordpress 2.0.3 upgrade</title><link>https://atlee.ca/posts/blog20060602mark-jaquiths-wordpress-203-upgrade/</link><dc:creator>chris</dc:creator><description>&lt;p&gt;I have downloaded and installed &lt;a href="http://markjaquith.wordpress.com/"&gt;Mark Jaquith's&lt;/a&gt; &lt;a href="http://markjaquith.wordpress.com/2006/06/01/wordpress-203-upgrade-changed-files-zip-changes-diff-changed-files-list/"&gt;WordPress 2.0.3 Changed Files ZIP package&lt;/a&gt;.


I have verified that the Changed Files ZIP package contains nothing that is not in the original &lt;a href="http://wordpress.org/development/2006/06/wordpress-203/"&gt;WordPress 2.0.3 download&lt;/a&gt;, so it is safe to use as far as I can tell.  Verifying this took more time than actually doing the upgrade!



I think the WordPress release team should provide something similar, as this is a much more convienient way of upgrading for those of us with just FTP access to our web hosts.&lt;/p&gt;</description><category>blogging</category><category>general</category><category>technology</category><category>wordpress</category><guid>https://atlee.ca/posts/blog20060602mark-jaquiths-wordpress-203-upgrade/</guid><pubDate>Fri, 02 Jun 2006 16:05:17 GMT</pubDate></item></channel></rss>