Tuesday, July 10, 2012

wordpress + django on same account - advisable or not?

I know this guy who asked the question. We've been members of a small pinax-based users group -- discussing spawning an e-commerce project. He is a serious guy and I know his situation. So, when he asks a question and gets an answer, I look very closely and learn from THE QUESTION.

bobhaugen Member Registered: 2008-02-25 Posts: 34
wordpress + django on same account - advisable or not? I have a client that wants to host a wordpress blog and a django app on the same account.

I understand from a bunch of forum posts that this is doable, for example: http://forum.webfaction.com/viewtopic.php?id=4656

But I have a few questions about the best way to do it, and if it is a good idea.

1. The examples say to put them on the same domain with django at the root, and wordpress on e.g. /blog. The client would prefer to have wordpress at a root, and django maybe at a subdomain. Is this possible? (The two apps will only be connected by hyperlinks.)

2. The two apps do not need to be on the same website, and the django app could remain at something.webfactional.com while the wordpress site is at a registered domain, e.g. somethingelse.com. So would it be cleaner to create two websites under the same WebFaction account?

3. Is this a good idea (running wordpress and django apps on the same account), or would be better to get 2 different accounts? The django app will be more mission-critical than the wordpress app, and go through more software changes. I assume they will both be running on the same apache server. Will the 2 apps interfere with each other? Is there a clean way to restart django without stopping wordpress?

4. Another complication might be that the people administering the wordpress and django apps will be different. By that I mean, the people logging onto webfactional via ssh and tinkering with the software and configuration. What should we watch out for there?

5. Assuming it is at least an ok idea, what size plan would be advisable? Neither app will have large number of users or hits, but the django app will be fairly complex and process a large amount of data. Moreover, the django app will use postgresql while wordpress will use mysql.

#2 2010-09-20 12:05:13 David L Administrator Registered: 2009-04-13 Posts: 578 Re: wordpress + django on same account - advisable or not?

1. The examples say to put them on the same domain with django at the root, and wordpress on e.g. /blog. The client would prefer to have wordpress at a root, and django maybe at a subdomain. Is this possible? (The two apps will only be connected by hyperlinks.)

This *is* possible, but Django really doesn't enjoy being anywhere but the root of a site. With some finagling, you can usually make it run with minimal issues. It's possible that this has been fixed in one of the more recent releases, though.

2. The two apps do not need to be on the same website, and the django app could remain at something.webfactional.com while the wordpress site is at a registered domain, e.g. somethingelse.com. So would it be cleaner to create two websites under the same WebFaction account?

That solves the above problem quite nicely

This is really up to you. We don't count PHP-based applications against your memory limit so if your Django application happens to chew through some memory your WordPress site won't be affected.

3. Is this a good idea (running wordpress and django apps on the same account), or would be better to get 2 different accounts? The django app will be more mission-critical than the wordpress app, and go through more software changes. I assume they will both be running on the same apache server. Will the 2 apps interfere with each other?

As I said above, they shouldn't interfere with each other.

Is there a clean way to restart django without stopping wordpress?

These run as entirely separate processes, so restarting Django has absolutely no impact on Wordpress.

4. Another complication might be that the people administering the wordpress and django apps will be different. By that I mean, the people logging onto webfactional via ssh and tinkering with the software and configuration. What should we watch out for there?

Naturally, if you're giving someone SSH access to your account it's possible that they can do damage. Other than malicious users, there really shouldn't be anything else to worry about.

5. Assuming it is at least an ok idea, what size plan would be advisable? Neither app will have large number of users or hits, but the django app will be fairly complex and process a large amount of data. Moreover, the django app will use postgresql while wordpress will use mysql.

We always recommend starting with our lowest plan and upgrading if/when necessary.

From what you've described, it's like you won't need much more than a Shared 1.

[Editorial: this post came from the webfaction forum so they are answering how much resources would be necessary.]

Monday, July 9, 2012

Speed up WordPress, and clean it up too!

- no title specified

Speed up WordPress, and clean it up too!

by Joost de Valk on 21 January, 2008 at 15:17 110 comments

Every once in a while people will ask me to fix their blog, because it's either slow, or broken. When it's not something to do with their WordPress hosting, (some hosts are just plain bad and slow), most of the time this is caused by either broken plugins, or broken themes. There are a few things I tend to do when I get to clean up stuff, and I though I'd list them for you.

Clean up your theme

header.php
First of all, what I do is make the header.php file do a lot less queries. Because themes have to be easy to spread, they have to get almost all the blog specific info from the database. That results in a lot of queries for stuff that you could just hardcode into the theme. Some examples, taken from the default kubrick theme:

1

<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

2

<head profile="http://gmpg.org/xfn/11">

3

<meta http-equiv="Content-Type" content="

4

  <?php bloginfo('html_type'); ?>;

5

  charset=<?php bloginfo('charset'); ?>" />

Could just as well be:

1

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">

2

<head profile="http://gmpg.org/xfn/11">

3

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

You can also:

Doing all that, you can remove 11 queries to the database, and this can highly speed up your theme.

footer.php
The default theme also has some of these calls to the database in the footer which you can make static, or remove altogether:

You can also remove all comments that aren't necessary, like "If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising." I can tell you that that line is in a LOT of footers, and it's a waist of bandwidth once you have decided to leave the link for WordPress in or not.

Check your coding habits

You will have added code to your themes for your plugins. Let's say you have a line of code like the one below, for a plugin that thanks people coming from search engines:

1

<?php refer_thanks(); ?>

This creates a problem, as soon as you, by accident or another cause, disable the plugin that holds therefer_thanks function. When the function doesn't exist, the code errors out, and your page doesn't continue to load, thereby breaking your blog. To fix this, PHP offers a special function calledfunction_exists, and using it, the code would look like this:

1

<?php if (function_exists('refer_thanks')) { refer_thanks(); } ?>

Now, if the function doesn't exist, your theme, and thus your blog, won't break. It's probably a good idea to do this for every line of code you added for a plugin.

Install a caching plugin

Lastly, you should really consider installing either WP-Cache, or WP-Super-Cache. They make your blog so much faster, that you won't know what happened to you once you've got them running.

All of this makes sure your blog remains maintainable, and fast.


The heading structure for your blog

- no title specified

The heading structure for your blog

by Joost de Valk on 2 September, 2010 at 16:00 45 comments

The heading structure of your pages is one of the very important aspects of on-page SEO. It defines which parts of your content are important, and how they're interconnected. Because they have different goals, a single post needs another heading structure than your blog's homepage or your category archives. This post intends to give you the basic pointers to get your heading structure right for those three different cases.

If you've ever heard of this new kid on the block called HTML5, or maybe even consider yourself an expert on it, please note that this post still treats headings in the HTML4 / XHTML1 way of using headings. I'll briefly talk about headings in HTML5 in the end, it's a whole 'nother ball game!

This post will cover:

  1. 1.5 basic principles about HTML headings 

  2. 2.The headings for your homepage 

    1. 1.The issue of full posts on archive pages 

  3. 3.Heading structure for your single posts / single pages 

  4. 4.Structure of headings for your category / tag / taxonomy pages 

  5. 5.Headings and HTML5 

  6. 6.Conclusion: re-think your blog's headers 

5 basic principles about HTML headings

Let's get these things straight before we do anything about our heading structure:

  1. 1.The most important heading on the page should be the H1. 

  2. 2.There is usually only one H1 on any page. 

  3. 3.Sub-headings should be H2's, sub-sub-headings should be H3's, etc. 

  4. 4.Each heading should contain valuable keywords, if not, it's a wasted heading. 

  5. 5.In longer pieces of content, a heading is what helps a reader skip to the parts that they find interesting. 

Based on headings, there are tools out there that can, and will, make an outline for your content. If you were to make an outline for this article, it would look like this:

The most widely known, and probably also the easiest, tool capable of doing this is the W3 Validator.

The headings for your homepage

So while we can (and will) discuss some specifics in the comments, your homepage should probably have a structure that looks like this:

As you can see, I differentiate between "related" widgets and unrelated widgets. It's no use at all to have an H3 heading saying "Our Sponsors". An H4 HTML heading saying "About this SEO blog" could be useful though, if "SEO blog" is what you want to rank for.

The issue of full posts on archive pages

Maybe you've seen it, maybe you didn't yet, but this sort of heading structure creates a problem. If you're displaying full posts on your front page, your sub headings would be H2's, just like your post titles. That's wrong, of course, and a good example of why we should be separating our content and markup a bit more then we're doing now, but that's not an easy fix. Basically, if you're displaying a post on an archive, category, tag or home page, each H2 should become an H3, H3 should become H4, etc.

No code samples yet, but my mind is working on this now, so it might come soon.

Heading structure for your single posts / single pages

This one is simple:

Makes sense right? The most important line on the page is the post or page title, second come the subheadings. Your blog title still has some value because, if the post is good, people will search later on for "Yoast WordPress SEO", for instance.

Structure of headings for your category / tag / taxonomy pages

If you actually want your category and tag pages to rank, meaning you've given them some unique content and are making them interesting for people, the heading structure should basically be the same as the homepage, with this difference:

Headings and HTML5

In HTML5 the entire method of dealing with HTML headings changes, and while it's a bit harder to grasp for people at first, the new system makes a lot more sense for content management systems. In short: headings and heading structures are section specific there, where section could be any part of a page. It would take too long to explain here, but if you're interested, read the header section of Mark Pilgrims excellent Dive into html5.

Truth be told, Mark doesn't talk about how search engines deal with HTML5 headers yet. In all honesty: I couldn't tell you yet. Simply a case of "not enough data to tell".

Conclusion: re-think your blog's headers

Now it's time for you to take some action. Go and use the W3 Validator now to check your blog's outline. If you've read an understood all the above, you should now be able to determine whether your theme is doing a good job. If you're using a premium theme or a theme that you downloaded from WordPress.org, I'd love for you to share your results in the comments!

SEO Friendly Images

SEO Friendly Images is a WordPress optimization plugin which automatically updates all images with proper ALT and TITLE attributes. If your images do not have ALT and TITLE already set, SEO Friendly Images will add them according the options you set. Additionally this makes the post W3C/xHTML valid as well.

ALT attribute is important part of search engine optimization. It describes your image to search engine and when a user searches for a certain image this is a key determining factor for a match.

TITLE attribute play lesser role but is important for visitors as this text will automatically appear in the tooltip when mouse is over the image.

Linkbaiting or Link Baiting Strategies?

- no title specified

Linkbaiting or Link Baiting Strategies?

BY AARON WALL

Rand mentioned that there are multiple types of linkbait, those that are known as controversial and those which are informational or comprehensive. I view them both as being in the same category though...evoking emotions and thus links. :)

I just updated my ebook again. I added quite a bit of information about designing / creating / formatting / packaging / launching / and marketing link bait. While it will surely change in future versions, here is some tips from the current version, similar to my recent WMW Pubcon talk on viral marketing.

Link Baiting
The idea of link baiting is to create a piece of content which is centered on a set demand from a specific audience. Who do you want to relate to? Why would they care? What would make them likely to spread your idea?

For example, Salary.com sponsored research stating that work at home moms did $134,121 worth of work each year. Because it was packaged as research and a story people would want to spread it spread far and wide.

Some common link baiting techniques

  • •.Talk about a specific community. 

  • •.Give people a way to feel important about themselves, someone they care about, or something they feel should be important. 

  • •.Take recent events and scale them out to others in your community. 

  • •.Be provocative or controversial. 

  • •.Be a contrarian. 

  • •.Be thorough. 

Controlling Your Message

  • •.Launch your story on a main channel such that you can change your messaging or update your offering based on feedback. If they wrong group runs with your story you may not want to stop them. ï 

  • •.If you do not have a main channel which you can launch your idea on try to launch your idea by giving a popular channel such as TechCrunch the exclusive on your story. 

  • •.If possible, build trust and attention in the marketplace well ahead of when you need to leverage it. 

  • •.Consider potential blowback ahead of time. Depending on the importance of your message and brand strategy you may want to make your message easy to misinterpret OR you may want to make your message clear. 

  • •.Create common link points. Do not throw away your link equity. For example, here are a couple ways people throw away link equity they earned: 

    • •.Some book authors do not create an official page about their book on their site, and thus just give away the link equity and top ranking to an online bookstore. 

    • •.Many people use Surveymonkey or some other 3rd party voting service when they create contests and polls. If you can include the voting script on your site you keep that link authority associated with your site even after the poll closes and people no longer talk about it. 

Magnetic Headlines

  • •.Be specific with your headlines. Salary.com stating that work at home moms are worth $134,121 a year is probably going to spread further than if they said $200,000. 

  • •.Write your headlines with the intent of spreading them. Focus more on writing something that evokes emotional responses and spread rather than writing for keywords and SEO. 

  • •.Given that many social news sites have a voting mechanism that does not even require people to read the article to vote, the title may be far more important than the actual content of your link bait. 

  • •.Copy Blogger offers great free headline writing tips. 

Me Me Me: the Selfish Web

  • •.People like to view themselves as being important. 

    • •.Many bloggers search for links to their blogs on Technorati or Google Blog Search multiple times each day (I typically do). 

    • •.Calling out specific people, especially with humor, is an easy way to build linkage data. 

    • •.Digg frequently has homepage stories about Digg or Digg users. 

    • •.People are more likely to believe and spread messages which reinforce their world view. 

  • •.Community involvement is important to help others identify with and feel ownership in your link bait. 

  • •.When Rand Fishken launched his Search Engine Ranking Factors he collected feedback from about a dozen prominent members in the SEO community. Many of those people are active community members who helped spread the news at launch time. 

    • •.Asking people for feedback can help others feel ownership in your idea, and is a way to pitch them on your idea without looking sleazy pitching it. 

Seeding Your Idea

  • •.Ask for feedback from people who may be interested in helping you improve your idea or helping you market it. 

  • •.Leverage friends and contacts via instant message and email. 

  • •.Pitch relevant bloggers and media sources. It is preferable to build rapport prior to pitching. 

  • •.Build accounts on social news sites. 

  • •.Some social news sites allow you to place voting buttons on your site. Do so on your most important ideas. 

  • •.Consider the best times and locations to launch your idea. 

  • •.Have a friend or yourself submit your best ideas to the most authoritative and relevant social news sites. 

    • •.Ensures your story has a title that is easy to vote for. 

    • •.Ensures your story is submitted at an appropriate time. 

    • •.If you do not do it soon after mentioning a story on your own site someone else may submit for you, using a dumb title or dumb post content. 

Launching a Static Site
Even if your site is fairly static in nature you can still create a buzz when you launch it.

  • •.Call in favors from people you helped in the past. 

  • •.ncorporate community ideas into your idea. 

  • •.Spread out your ideas. For example, if you are forming a new partnership you can triple dip on publicity: 

    • •.Interview partners on another channel. 

    • •.Announce the launch. 

    • •.Add linkbait to the site at a later point in time. 

Formatting Link Bait

  • •.Make it easy to identify and connect with. Think about human emotions and tap the sense of empathy. 

  • •.You may want to make your idea look polarized such that it especially appeals to one group and/or especially offends another. If other people are fighting over guessing your intentions you will get quality links. 

  • •.Make your link bait look comprehensive. 

    • •.Perception is more important than reality. 

    • •.Most writing is quite wasteful in nature, because you have to trim off much of what you create. 

    • •.By creating ordered lists of factoids an incomplete story can look well researched, even if it is not. For example, if you make a list of 101 ways to do x people may give a few ideas and some feedback, but nobody is going to sit and list 383 ways to do x. 

  • •.Cite research, further reading, and link out to related resources from within your content. It makes your story look well researched and associates your work with other trusted names or brands in your field. You may even want to cite a few people that you want links from. 

  • •.Dress up your link bait using quality design and / or relevant images from sites like Istockphoto. 

Monetizing Link Bait

  • •.Make your link bait EASY to link at. 

  • •.Don't over-monetize it right out of the gate. Make it look like research which is easy to cite rather than a piece of commercial information. 

  • •.In Fame vs Fortune: Micropayments and Free Content Clay Shirky stressed the importance of gaining authority to gain scale and distribution if you want to make money online. 

  • •.Link bait rarely makes much money or directly pays for itself from the direct traffic. However, it has amazing indirect value. 

    • •.People who pay attention to the active portions of the web are far more likely to be web publishers than those who do not. 

    • •.Even if people do not link to your link bait idea right away you still gain mindshare and brand recognition amongst a group of people who have significant authority. 

    • •.Many search engines, such as Google, use authority centric relevancy algorithms. Editorial links are seen as votes or signs of trust. 

    • •.In Google, getting a link to any part of your site will help make all pages on your site more authoritative. 

  • •.Two weeks after launching a linkbait my Google traffic and site earnings more than doubled on a site that was getting thousands of visitors and making over $100 a day from AdSense before the viral marketing campaign. 

Bubbling Up

  • •.Social news sites and social bookmarking sites have recently popular lists that many people read. 

  • •.Meme trackers track what stories are quickly spreading through the blogosphere. 

  • •.Exposure on either of these can cause additional exposure and more linkage data. Many bloggers and some mainstream media outlets (like the MSNBC Clicked Blog) use these social news sites to find stories or sources. 

Don't Compete With Yourself
Be careful what you name your link bait ideas. If your link bait is well executed and targets keywords important to other pages on your site the link bait will likely outrank your other pages in the search results.

Our SEO for Firefox page nearly outranks our homepage in Google for SEO.