Archive for the ‘Wordpress’ Category
-
Why Subversion is not a complete way to update WordPress
While WordPress offers the functionality of upgrading core files, themes and plugins via the Dashboard, this feature cannot be used with some webhosts who are keen on security. Upgrading via FTP is time-consuming and error prone. FTP is also not very secure. To quote one webhost, “Its 2012, and you shouldn’t be using FTP for anything.” Subversion offers the promise of
one-clickone-command, lightning-fast, server side upgrades. Is Subversion the way to go or has Subversion yet to grow up for the casual WordPress user? Please note that this posting is more of a documentation of experiential learning in an area that really needs documentation. This is not to be read as a manual. And I am not in a position to offer support.What is Subversion?
Subversion is a version control system for software. The basic concept is to host the most recent copy of the software on a publicly accessible web server, known as a repository. Using a few shell based commands, a user can download or upgrade to the latest version of the software. A user can also downgrade to a previous version of the software if he or she finds that previous release more stable. A developer can also access the latest “nightly build” of the software for testing purposes (referred to in subversion as the “trunk” version). All approved developers of the software can commit changes to the trunk version of the software in real-time, making the trunk version of the software a working copy of latest code changes. This is especially helpful for software like WordPress, whose total developers number in four digits.For a long time, repositories were the only painful way to get software and patches for Linux (in the interest of security). Later distributions of Linux added GUIs to make this process more interactive. However, Linux now allows downloading and installing software from websites, provided the installer file has a .apt extension.
How is subversion different from FTP?
FTP involves dumping files from your own computer onto the web server. Subversion works strictly on the web server side (and must be supported by your web server). You issue shell commands to the web server to download software onto your web server.
There are complex ways to make Subversion work locally as well. For example, you could download and install the Tortoise SVN client, which creates a repository of desired software on your hard drive. And this in turn, is synced with your web server. But again, this defeats the purpose of making installation and upgrade strictly web based. And its not as simple as it sounds. I am still looking for a good tutorial.
How is a Subversion WordPress Installation different from a Traditional FTP one?
A Subversion WordPress Installation has a folder called .svn in the main root directory. Similar .svn folders can be found in the Themes and plugins directory, as well as for each and every theme and plugin folder.
The .svn folders store files with the extension of .svn. They contain version information about WordPress and its components. This information is necessary for future Subversion upgrades or downgrades. These files can be downloaded via FTP and viewed with an editor such as Notepad++. But it is not possible not recommended to edit these files in any way. Doing so can “break” Subversion upgrades. It is also not recommended to move them around using FTP, as they store path information which may not be correctly updated. These files are only meant to be handled using a shell-based command line interface. Removing these files makes your WordPress installation identical to a traditional FTP one.
A Subversion WordPress Installation is expected to be only upgraded through subversion. Later doing an FTP upgrade of the Subversion WordPress installation will not impact WordPress functionality in any way. But Subversion will get broken and may not be used again. Installing themes and plugins via FTP on a Subversion WordPress installation will not impact the functionality of these components in any way. Neither will it break Subversion for the core WordPress installation. And neither will such themes and plugins be lost when WordPress is upgraded via Subversion. Likewise, such themes and plugins can only be updated via FTP, not Subversion.
What are the advantages of Subversion
The primary advantage of Subversion is for developers, who need access to latest “bleeding edge” versions of WordPress, WordPress plugins and WordPress themes. There is no other way of accessing this stuff.
For the casual user, WordPress can also be installed for the first time using Subversion. Compared to an FTP install, a Subversion install takes only a fraction of the time (around 15 seconds). Upgrading WordPress via Subversion also takes around 15 seconds. And requires only entering a command. This means your blog will be offline for a lot less longer. And this can be done remotely, as long as you have the right credentials. Upgrading WordPress via FTP requires care. The latest version needs to be downloaded and unzipped. Some files and folders in the existing installation have to be deleted and new ones are then uploaded to replace them. There is always the danger of deleting the wrong files, which can jeopardize the blog.
How to Install WordPress via Subversion
Once you have made sure your host supports Subversion, all you need to do is to connect to your FTP account using a terminal. A free software such as Putty can be used for this purpose.
-
Connect to your website by typing your FTP credentials into the terminal window
-
In a browser, go to WordPress.org and note the version number of the latest stable release (in this case, it is 3.3.1).
-
Go to your root folder using the cd (change directory) command.
-
If you want to install WordPress into a folder such that your blog will be accessible at example.com/blog, type
-
mkdir blog
-
Then navigate to it by typing cd blog
-
-
If you want to install WordPress to the root directory, ignore the previous step.
-
Type svn co http://core.svn.wordpress.org/tags/3.3.1 . Note the trailing dot preceded by a single space.
-
Files will start being downloaded and unzipped. You should be done in less than a minute.
Needless to say, Subversion is not the only way to make a fast install of WordPress. A non-SVN version can also be installed via command line using the following procedure,
-
Connect to your website by typing your FTP credentials into the terminal window
-
In a browser, go to WordPress.org and note the version number of the latest stable release (in this case, it is 3.3.1).
-
Go to your root folder using the cd (change directory) command.
-
If you want to install WordPress into a folder such that your blog will be accessible at example.com/blog, type
-
mkdir blog
-
Then navigate to it by typing cd blog
-
-
If you want to install WordPress to the root directory, ignore the previous step.
-
Type wget http://wordpress.org/latest.tar.gz
-
Files will start being downloaded. To unzip them, type tar -xzvf latest.tar.gz
-
Then remove the zipped file typing rm latest.tar.gz
Once you are finished installing via Subversion, wget or plain old FTP, make sure you are in the WordPress directory, and type the following commands to set up permissions properly:
-
chgrp web index.php
-
cd wp-content
-
mkdir uploads
-
cd ..
-
chmod -R 775 wp-content
-
chgrp -R web wp-content
-
mkdir tmp
-
chgrp web tmp
-
chmod 775 tmp
To enable media uploads via the WordPress Dashboard, you will need to change some group ownership permissions
-
chgrp web wp-admin/async-upload.php
-
chgrp web wp-admin/media-upload.php
Further information on activating your WordPress install and connecting it to your MySQL database can be found here.
How to convert an existing WordPress Installation to Subversion
This is beyond the scope of this article. Please note that converting existing blogs to Subversion can be nightmarish if WordPress was installed in the root folder of the public directory. Although WordPress provides detailed steps and further information can be found, some web hosts do not allow renaming/swapping of the root directory.
How to upgrade WordPress via Subversion
Only a WordPress Installation that was installed via Subversion can be upgraded using Subversion.
-
Connect to your website by typing your FTP credentials into the terminal window
-
In a browser, go to WordPress.org and note the version number of the latest stable release (in this case, it is 3.3.1).
-
Go to the folder that contains the WordPress installation using the cd (change directory) command.
-
Type svn sw http://core.svn.wordpress.org/tags/3.3.1/ . Note the trailing dot preceded by a single space. Note that this is slightly different from the earlier install command.
-
Files will start downloading and unzipping. You should be done in less than a minute. Unlike an FTP upgrade, an SVN upgrade only downloads and updates specific files and components that have been upgraded, and is therefore less time consuming.
-
Login to your WordPress Dashboard using your browser and make sure everything is OK.
How to install additional plugins via Subversion
This is the part where Subversion falters. The WordPress Subversion installation comes bundled only with the Akismet plugin. To install additional plugins, you have to engage in command line acrobatics.
-
Go to WordPress.org and note the latest version of the plugin (In this case, 1.6.13.8).
-
Go to the WordPress plugin Subversion repository and note the name of the plugin. For example, the plugin All in One SEO Pack will be listed as all-in-one-seo-pack.
-
Download and install Vim on your computer. Vim is a command line editor that works very well within the shell environment. Don’t bother learning to use it because we will only make use of it in an indirect, limited way. Of course, there are more user-friendly editors as well, but Vim seems to interface with minimal errors.
-
Connect to your website by typing your FTP credentials into the terminal window
-
Go to the folder that contains the WordPress plugins using the cd (change directory) command.
-
We need to set Vim as the command line text editor. Type export SVN_EDITOR=vi
-
Type svn propedit svn:externals . Note the trailing dot preceded by a single space and the single quotation marks.
-
This will open an editable file in command line. Before you proceed, please note that you will have to use Vim-specific keyboard commands. The mouse will not work. A handy guide to Vim-specific commands can be found here.
-
Go to the line below it using Vim-specific commands and type
-
all-in-one-seo-pack http://plugins.svn.wordpress.org/all-in-one-seo-pack/tags/1.6.13.8/
-
Save the file by typing Vim-specific commands ( : followed by x followed by [return])
-
Type svn update
-
Go to your WordPress Dashboard and activate the plugin.
How to install additional themes via Subversion
This is another part where Subversion falters. The WordPress Subversion installation comes bundled only with two basic themes. To install additional themes, you have to engage in command line acrobatics.
-
Go to WordPress.org and note the latest version of the plugin (In this case, 1.2).
-
Go to the WordPress theme Subversion repository and note the name of the theme. For example, the theme Coraline will be listed as coraline.
-
Download and install Vim on your computer. Vim is a command line editor that works very well within the shell environment. Don’t bother learning to use it because we will only make use of it in an indirect, limited way. Of course, there are more user-friendly editors as well, but Vim seems to interface with minimal errors.
-
Connect to your website by typing your FTP credentials into the terminal window
-
Go to the folder that contains the WordPress themes using the cd (change directory) command.
-
We need to set Vim as the command line text editor. Type export SVN_EDITOR=vi
-
Type svn propedit svn:externals . Note the trailing dot preceded by a single space and the single quotation marks.
-
This will open an editable file in command line. Before you proceed, please note that you will have to use Vim-specific keyboard commands. The mouse will not work. A handy guide to Vim-specific commands can be found here.
-
Go to the line below it using Vim-specific commands and type
-
coraline http://themes.svn.wordpress.org/coraline/1.2/
-
Save the file by typing Vim-specific commands ( : followed by x followed by [return])
-
Type svn update
-
Go to your WordPress Dashboard and activate the theme.
How to upgrade additional themes and plugins via Subversion
When you upgrade WordPress via Subversion, only the Akismet plugin and the two default themes will also be upgraded. The additional themes and plugins have to be separately upgraded via command line acrobatics.
-
Login to your WordPress Dashboard. Your dashboard should indicate which plugins/themes are out of date and what are the version numbers of the new version. Alternatively, this can be done by checking the WordPress plugin and theme Subversion repositories (which is safer, because Subversion can only update to version numbers listed in the repository; For example, the WordPress Dashboard may indicate the new version as version 2.31 whereas the correct format (as listed in the repository) is 2.3.1.
-
Download and install Vim on your computer. Vim is a command line editor that works very well within the shell environment. Don’t bother learning to use it because we will only make use of it in an indirect, limited way. Of course, there are more user-friendly editors as well, but Vim seems to interface with minimal errors.
-
Connect to your website by typing your FTP credentials into the terminal window
-
Go to the folder that contains the WordPress plugins (or themes) using the cd (change directory) command.
-
We need to set Vim as the command line text editor. Type export SVN_EDITOR=vi
-
Type svn propedit svn:externals .Note the trailing dot preceded by a single space and the single quotation marks.
-
This will open an editable file in command line. This is the same file you previously edited to add additional themes or plugins (which should be listed in the file). Before you proceed, please note that you will have to use Vim-specific keyboard commands. The mouse will not work. A handy guide to Vim-specific commands can be found here.
-
Go to the line on which your plugin/theme is listed using Vim-specific commands. Then move your mouse to the version number using Vim-specific commands. And replace the existing version number with the new version number, using Vim-specific commands.
-
Save the file by typing Vim-specific commands ( : followed by x followed by [return])
-
Type svn update
-
Go to your WordPress Dashboard and make sure everything is right.
Conclusion
While updating WordPress through SVN is a breeze, the same does not apply to updating (or installing) additional themes and plugins.
Nowhere is the casual WordPress user near the dream of updating WordPress and all plugins/themes using one command. Rather than a step towards automation for the casual user, SVN as it stands today, is still a developer tool that is best suited for updating to the “trunk”versions. Updating to latest stable releases requires manually entering the version number of the latest stable release. There is no command for automatically updating to the latest stable release.
Clearly, Subversion for WordPress has a long way to go before it can truly replace FTP as a solution to update WordPress. In fact, installing/updating additional themes via FTP may be less time consuming in certain cases (Putty does not remember login credentials). Also, there is quite a margin of error when typing in text via command line, using the convoluted Vim interface.
The precarious typing also takes out the joy of trying out new plugins on whim.
There are of course, complicated ways to create a unified update process for both WordPress and additional themes and plugins. These are clearly beyond the scope of the casual user.
But until Subversion for WordPress grows up, a hybrid solution can be pursued. While WordPress may be be installed and updated via Subversion, additional themes and plugins may be installed using FTP. The two can coexist, and even updating WordPress through Subversion will not affect the functionality of the additional themes and plugins installed via FTP.
Further Reading (Subversion How-To’s)
What WordPress has to say on Subversion
Upgrading WordPress via Suubversion
Useful SVN Commands
Installing additional plugins via subversion
svn:externals command line wizardry (1 & 2)
Loading ... -
-
Piwigo and Zenphoto; a Comparative Review
Open Source Software for web-based photo galleries has been around for a very long time. Web based photo galleries mean different things for different people. The casual user feels no compulsion to go Open Source and host his or her own photo gallery, thanks to Flickr®, Picassa®, Photobucket® and Facebook®. But apart from privacy and ownership issues, these services are fairly limited when it comes to integration with blogging platforms. For example, Photobucket® only allows its users to post a slide show of their photos in a blog post. A clickable thumbnail gallery cannot be inserted into a blog post as of now. And Photobucket® has the annoying tendency to automatically resize images to save bandwidth (at the expense of quality). For example, a 1.5 MB DSLR image will end up becoming a 70KB image once its uploaded to Photobucket®.For me, experimenting with Open Source web-based photo galleries began when I began to realise the limitations of WordPress when it comes to photoblogging.
When WordPress started off, photos were more or less an afterthought. Photos on WordPress were given some advanced functionality by plugins. The best I could find was the nextGEN gallery by Alex Rabe of Germany, which seems to be partly inspired by oldtime photoblogging favourite, Coppermine.
Everything was great with nextGen gallery, until I wanted to add just a little more content to photo descriptions. I discovered that it was impossible to add a hyperlink into the image description field (unless I was willing to hack some components). For those interested in pursuing this path, here’s a link.
Even WordPress admits its helplessness when it comes to photos, suggesting that users change their site theme to a photoblog theme, or use a WordPress plugin that is compatible with an outside web-based photo gallery.
Since I am an occassional photoblogger, changing the site’s theme to a photoblog theme was not an option. Therefore I started on my quest to find an ideal Open Source web-based photo gallery. I had some very specific criteria.
- Maximum compatibility with WordPress, especially when it came to inserting image galleries into a blog post.
- The ability to add HTML content to a photo’s description.
- The ability to add Copyright info to a photo’s description.
With these criteria in mind, I found Wikipedia very helpful in narrowing down on Piwigo and Zenphoto. Apparently, these two Open Source web-based photo galleries have the most features. A close third would probably be Coppermine.
Please note that my comparative review is based on Piwigo 2.3.2 and Zenphoto 1.4.1.6. Things are changing fast in this area and this comparative review should be considered outdated in a few months.
It is interesting to note that while WordPress development has diverged from photoblogging, Open Source web-based photo galleries now draw cues from Wordpress’s famous “five minute install” and theme/plugin architecture.
Piwigo and Zenphoto; History
Both Piwigo and Zenphoto have been around for more than five years. Zenphoto is relatively newer (they don’t have a Wikipedia page). Zenphoto developers appear to be based in America while Piwigo developers appear to be clustered in France. It appears that Zenphoto is more small scale than Piwigo, in terms of code volume. This is quite surprising because I found it more feature-rich and more sophisticated. Both Zenphoto and Piwigo have had security vulnerabilities in the past (all appropriately patched). But Zenphoto appears to have had more than its share of bad press.
Piwigo also offers full fledged photo hosting service (in the fashion of WordPress.com).
Piwigo and Zenphoto; Installation
I ran into installation issues related to PHP on my host server and file permission settings with both Piwigo and Zenphoto.

- Zenphoto gives a thorough preinstall analysis
In the case of Piwigo, I had to shoot in the dark because there were no preinstall checks. In the case of Zenphoto, a preinstall screen pretty much summed up all of my issues, giving me specific pointers on troubleshooting.
Newbie Tip: Never Install Piwigo or Zenphoto onto your existing WordPress database. Create a new database. And better yet, install on a subdomain instead of your WordPress domain.
Piwigo and Zenphoto; Support
I consider support for Open Source software as a courtesy and therefore my expectations were low.
But within a day of posting my problems on Piwigo and Zenphoto support forums, I recieved direction from their support staff.
Zenphoto appeared to have some (non-impacting) technical issues with their forums. They also have a system of moderating newbie posts.
Piwigo and Zenphoto; Features
Both Piwigo and Zenphoto were able to superbly meet requirements 1 & 2 (adding html content to individual images). But I found Zenphoto to be more sophisticated and advanced (detractors may use the word “dizzying”). There is the ability to fine tune everything. For example, Zenphoto has the option of enabling secure logins, (provided the server supports OpenID) whereas Piwigo does not. In addition, the bundled themes that come with Zenphoto are very clean and sophisticated. Zenphoto even has special themes that can replicate your original WordPress blog themes!
When uploading image files via FTP, Piwigo requires that thumbnails be also created and uploaded to a subfolder with the prefix TN-. This requires batch processing of image files by a local image editor such as Adobe Photoshop Essentials. The alternative is to avoid uploading images via FTP and instead use a special upload program (Ploader) created by Piwigo. Zenphoto has no such requirements.
Piwigo and Zenphoto; WordPress Integration
Zenphoto initially appeared promising when it came to WordPress integration. After all, there were four WordPress plugins for Zenphoto, compared to just one for Piwigo.
But the first Zenphoto plugin for WordPress is no longer under active development. Another one “may” support Zenphoto later on. One plugin (ZenphotoPress) that appeared promising works as intended, but only if zenphoto is hosted on the same site as the wordpress blog. Another plugin allows Zenphoto integration on another blog by reading the public RSS feed of the Zenphoto gallery (provided that it is enabled). But it does’nt appear compatible with the latest release of Zen photo.

- PiwigoMEDIA WordPress plugin allows easy insertion of images in a Piwigo Gallery, as well as entire thumbnailed albums.
This left me with no way to go but Piwigo. The Piwigomedia Plugin utilizes the TinyMCE interface and works exactly as intended. It does not duplicate images in the Piwigo gallery. A demonstration can be found at the bottom of this page.
Conclusion
While Zenphoto clearly has sophistication and features, Piwigo has best managed to achieve WordPress Integration while offering an impressive, yet not dizzying array of features.
Loading ... -
The Easiest way to Insert Tables into a WordPress blog post
As WordPress users may be aware, the Write Post dashboard in WordPress does not give the option for creating tables.
The alternative is to paste tables as pure HTML. This will only work as desired when pure HTML is inserted. Pasting the HTML of a table created in Google Docs appears to work flawlessly. On the other hand, creating a table in Microsoft Word, saving it in HTML, and then pasting the HTML will get you the table, but there may be all sorts of inconsistencies. Such as the table spilling over the entire blog page and the loss of format elements.
Another alternative is to use a WordPress plugin that can import tables created in Microsoft Excel.
An expert-only alternative is to manually modify the WordPress Write Post dashboard to include table features! It is possible.
But so far, I have found that the easiest way to create tables in a WordPress blog post is to take advantage of the advanced format options available in Windows Live Writer.
This table was created in Windows Live Writer. Isn’t it cool? 1. No more messing with HTML 2. WYSWIG editing 3. No more tweaking plugins Of course, The simple Table Editor packaged with Windows Live Writer is no match for the one that comes with Microsoft Word. For example, you cannot edit the colors of the table borders or the cell backgrounds. You cannot merge cells. But you can adjust the height of rows, columns and cells. You can adjust the alignment of values in the tables. You can add/remove rows and columns on a pre-existing table. You can insert pictures into the table as well. This is definitely a more convenient workaround until WordPress gives us a table feature. The picture on the left is a screenshot of the dropdown menu under “Table” in Windows Live Writer version 14.0.8064.206.en.
What is a techtangerine?
Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jan | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | ||||

