General

How to add Microdata to Shopify Product Pages

Google defines Microdata as “An open-community HTML specification used to nest structured data within HTML content. Like RDFa, it uses HTML tag attributes to name the properties you want to expose as structured data”. If you are using Google Merchant and have received errors or warnings regarding missing microdata for prices, condition, or availablity, then the code below will solve this issue. Simply copy the code and paste it into the head section of the theme.liquid file. The code below assumes you are selling only “new” products.

WordPress

Monitor your WordPress Installation for Hacking

WordPress installations require some folders to have permissions set at 777 either temporarily or permanently. These writable folders allow hackers to upload files used for phishing, DDoS, or sending email spam. The WordPress File Monitor Plus Plugin monitors not only the files in the WordPress installation folders but all the files in the public folder for additions/deletions/changes. Here are features in the latest version (2.2): Monitors file system for added/deleted/changed files Sends email when a change is detected Administration area alert to notify you of changes in case email is not received Ability to monitor files for changes based on file hash, time stamp and/or file size Ability to exclude files and directories from scan (for instance if you use a caching system that stores its files within the monitored zone) Site URL included in notification email in case plugin is in use on multiple sites Ability to run the…

General

Media Temple DV 4.0 – Cronjob Issues with Plesk 10

After migrating from Media Temple DV 3.5 to Media Temple DV 4.0, I found my email box filling up with notices of cron errors. Sometimes, the error was “-: wget: command not found” or other times “-: php: command not found”. Commands worked perfectly fine if run in SSH but not through the Plesk Cron Tab (Scheduled Tasks). Initially, calls to the normally superb Media Temple Support resulted in several unsatisfactory replies such as “crons should work just fine on Plesk 10” or “we really don’t support crons”. I tried everything. Believe me, several weeks living without crons was not fun. Databases didn’t get backed up, emails didn’t go out, cleanup scripts didn’t run, etc. Then finally, a senior support engineer at Media Temple put me on the right track by mentioning that the user (i.e., the service) requires shell access to run crons in Plesk 10.

WordPress

WordPress Code Injections – A New Threat

One of my clients has a rather popular sports site on based on WordPress. The site is up-to-date and running on DV server. A few weeks ago malicious code starting to appear on the site setting off warnings from anti-virus programs that monitor websites. Sometimes, entire files are uploaded that contain malicious scripts. Most of the time, however, JavaScripts are appended to existing PHP or HTML files. One of the favorite targets is the WordPress index file (index.php). A self-executing JavaScript is added after the closing ?> tag. How they append the file is a bit of a mystery as permissions are correctly set at 644. The purpose of the malicious code seems to vary. Some code attempts to spread worms/trojans, steal passwords, or re-direct to spam sites (meds).

General

How to make DomainKeys using Plesk 8.60 with external DNS control

Server-generated emails on websites requiring registration or verification, often do get not through Hotmail and Yahoo Mail spam filters. Hotmail requires a valid SPF record which is easy to implement. And, Microsoft will whitelist your domain for Hotmail if you request it. Yahoo filed a patent for the DomainKeys concept in 2003. They still use DomainKeys and require it especially for server-generated emails. Implementing it used to require running a Perl script to generate the key pair for the electronic signature. And, instructions for updating your server DNS are difficult to find. Plesk 8.6.0 has DomainKeys built into the Plesk CPanel. However, there is one extra step that is critical if you control the DNS externally (for example, with Media Temple’s Account Center). Here’s how to do it:

WordPress

WordPress Leading Whitespace Fix – XML Parsing Error…

I recently got the nasty “XML Parsing Error: XML or text declaration not at start of entity Location” error instead of RSS feed on two client WordPress sites. First, I tried the Fx-RSS-Feed plugin. No luck! it identified several hundred WordPress and theme files with unnecessary whitespace. Most of the files were write-protected. Way too much work for me to change all the permissions, run the plugin, and change them back. Instead, I used the fix at Wejn’s lair. Scroll down the page and download the file “wejnswpwhitespacefix.php” or get the text version here.

General

The Best Dummy Text Generators – Lorem Ipsum

Web developers use dummy text as placeholders when building websites. Dummy text is required when the final text is not yet available from the client. It is used to demonstrate the appearance of different typefaces and layouts. Usually, the dummy text is nonsensical or unreadable my most people as not to distract from it’s purpose. Lorum Ipsum can be traced back to ‘De finibus bonorum et malorum’ (On the extremes of Good and Evil) by Cicero in 45 BC. The original passage began: Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit (Translation: “Neither is there anyone who loves grief itself since it is grief and thus wants to obtain it”). It is not known exactly when the text acquired its current standard form; it may have been as late as the 1960s. The passage was discovered by Richard McClintock, a Latin scholar who is…