Tutorials & Guidance of web hosting services. We seriously test all items from top companies then provide a quick manual for users to start with their service easily.

WordPress Gravatar Configuration Tutorials

wordpress gravatar configuration

I have been playing with wordpress for very a long time and doing lots of customization on my site such as this web hositng review one. But I rarely pay attention to one important feature — Gravatar. After a bit research, I would like to share the knowledge I learnt.

What's Gravatar?

Here's the definition from gravatar official site:

"A gravatar, or globally recognized avatar, is quite simply an image that follows you from site to site appearing beside your name when you do things. Avatars help identify your posts on blogs and web forums, so why not on any site?"

For short, it's your head image when commenting on some popular blog systems like wordpress, blogspot etc. Even you're not blogging or commenting, when you visit some blogs you will find many beautiful pictures of commentors. That's because the Gravatar is enabled from wordpress admin panel. If you do not have a personal gravatar, it will pick from the system default settings.

How to get & use Gravatar?

In order to show up our personal gravatar, we have to register from the gravatar official site http://gravatar.com first. Once it's accepted our picture will be saved in gravatar system. But please note, during the registration we need to pick up a correct rating for the picture we uploaded (G, pg, R, X). Once submitted, it will be approved manually by their workers so please make sure to choose the right rating.

When we comment on a blog post and use the same email address from gravatar registration, our head image will be displayed. So the key point is the registration email address, it'll grab the picture from gravatar system directly.

As website admin, we can pick up a head image from system default ones directly. In case we don't like the system defaults and don't want to register with gravatar, we can add the following to functions.php of our wordpress theme.

//Make a new default gravatar available on the dashboard
add_filter( 'avatar_defaults', 'newgravatar' );
function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo('template_directory') . '/images/newImg.jpg';
$avatar_defaults[$myavatar] = "newImg";
return $avatar_defaults;
}

The '/images/newImg.jpg' is the gravatar you would like to use, we place in the images folder of wordpress theme. Once it's saved, we can login to wordpress > Setting > Discussion, the newly defined gravatar will be available there.

The wordpress gravatar codex documentaion: http://codex.wordpress.org/Using_Gravatars
Excellent wordpress gravatar plugin: http://wordpress.org/extend/plugins/wp-gravatar/
Recommended WordPress hosting provider: www.inmotionhosting.com


How to Host Asp.net Application on Linux?

asp.net on linux

From the last posting I wrote about how to use connect mysql via asp.net technology. Because the web development makes everything possible, can we host asp.net applications on linux machine directly? The answer is yes, I would like to make a brief introduction about the general setup and check if it's good idea for production server deployment.

How to host asp.net website on linux server?

The answer is Mono. We can either add mod_mono for Apache web server or use the XSP webserver directly to serve asp.net pages. While Apache is the standard web server for linux, XSP is a "light-weight web server" capable of hosting and serving ASP.NET applications. The setup of XSP is little complex. To shorten the setup process and go with the standard, we highly recommend using apache. The detailed setup available on this apache mono setup page. If you would like to learn more details about the configuration, it's available on this codeproject article

Once you configured the module properly, you can put your asp.net codes to website working directory and it will out put the cool page as expected!

Why Hosting asp.net on linux server?

Just think about the price of windows server products and service fee for hosting. The possibility of hosting asp.net on linux is absolutely a big progress of web hosting industry. From professionals review, the ability to run Asp.net on linux is important to windows developers since low-cost hosting providers will see Mono as an inexpensive way to provide Asp.net hosting to clients. Because Mono also runs on windows we no longer need Linux to test our application for crossplatform compatability.

Is it suggested to host Asp.net site with Linux Hosting?

The mono project has been open for several years but not yet that perfect to serve any kind asp.net project, it's being developed to be fully compatible with windows technologies. However, unless you're doing local development, we never recommend to host your live .net site under linux hosting service. Simply because we can't make full use of the asp.net features as many objects/components are available from windows server only. The mono only be able to serve simple asp.net scripts that does not rely on windows components.

In case we need to introduce into some sophisticated configurations, we have to switch to windows for 100% compatibility. Generally speaking, we can only host some basic asp.net pages on linux server to approve the capability of linux hosting server.

How do we think about?

Because of the above weakness and limitations I think no much people would be interested to host their money-making website under such environment. But it's still a good sign for future low cost web hosting. Because of the development of such technologies we can spend less to put up our applications online. There's not an actual web hosting service with asp.net support on linux yet, but the tech development makes it possible in near future.


How to Host Asp.net With Mysql

asp.net mysql hosting

asp.net is popularly used in web development, at the meanwhile Sql server database is always the golden partner since from the start. But for various reasons, we can't always use this database system. In this article we're going to introduce how to build asp.net project with mysql database.

Best Asp.net Hosting with mysql Support

Logically, every quality asp.net hosting provider should have installed mysql odbc connector on their servers. but it's advised to confirm with your hosting support because the policy is different for each company. Also, we need to make sure mysql support is available with the hosting too. So as you see, it's not so easy to put up a mysql driven asp.net site on hosting server. Based our years' experience in web hosting, Arvixe http://www.arivxe.com is the best recommendation based server performance, overall hosting features and tech support.

Arvixe asp.net hosting plans are full compatible with mysql technologies, their tech team has pre-installed all up to date odbc drivers and necessary components to power your asp.net scripts. List of the core features

  • Unlimited Mysql databases
  • Fully compatible with asp.net scripting
  • Latest windows server platform
  • Friendly and easy to navigate hosting control panel
  • Only $5/mo to start
  • Up to 60 days full money back guarantee

Visit arvixe for asp.net hosting plans http://www.arivxe.com

Why use mysql for asp.net site?

When we use Asp.net + Mysql, it doesn't mean it's better than sql server system. The case mostly happened on web hosting deployment, we always have to upgrade to full version sql server database and pay extra fee. Because when we use VS to build the project on local computer the built in database is sql express, however it's not the best solution on hosting server and not supported by most asp.net hosting. The database and web servers are always separated on hosting. In case we don't want to pay the upgrade fee but still want to use asp.net, we can consider switch to mysql.

What should we pay attention to? Because VS has no built in support for mysql, we have to configure the connections manually. We need to install mysql odbc connector and make sure the hosting server has the same version installed. here're two docs about how to

Is there any disadvantage?

Since sql server is the default database system for asp.net development, using mysql is technically limited in many ways such as sql report, security etc.. Unless there's a special reason, we highly recommend to deal with sql server. Mysql would be good for small and simple website solutions.

Using mysql will reduce your cost for website investment, however unless you're pretty familiar with the operation and maintainance, you should use sql server database instead.

How to Save Website Bandwidth Usage

How to save website bandwidth

Unlimited bandwidth seems to be a popular offer for most web hosting services. But there're also many complaints for website down because of overloading on server. So we know the unlimited stuff is only a marketing term to get orders. But how can we save the bandwidth usage on our website and avoid potential issues? This is our today's topic.

How is website bandwidth calculate exactly?

There's a formula of bandwidth calculation — Page view x Page size + Download size x Download times

PV(Page View) –Means the total number of website requests within a specific period. For example there're total of 100 website visitors with average 5 pages view per visitor, then the website daily PV is 5 x 100.

Hits –The number of requests to every elements on web page (Any element like picture or flash etc is considered the page element)

Daily bytes –The total bytes of web site element requests per day.

Because the hosting server resource is limited, if one or several sites are generating large traffic, the CPU, RAM and I/O usage will burst up and finally affect other websites on same server. Regardless the advanced technologies from hosting provider, the total resource is always limited. If we over used what we're allocated we'll get punished. That's why we should evaluate carefully about which service is most suitable but not only pay attention to the low price.

Tips on how to save website bandwidth

There're many factors to affect total bandwidth usage such as picture and video. Here let's check out one by one.

Unless it's a must, it's not a good idea to upload many videos to hosting account directly. Instead we can make good use of the third party services like youtube for video storage purpose and embel them to our web pages directly.

Picture would be the second most bandwidth consuming factor on website. We can either optimize the picture size or upload to a third party service in case we have a large size. how to optimize the size? There're many tools available on internet. For example if we're using photoshop for picture design, we can save the picture as web use (Press Ctrl+Shift+Alt+S). In this way the actual picture size will be compressed a lot with the minimum color loss.

Add hotlink protection to website. A quality web resource is always republished by other people, but many new posters will keep the original elements link and eat our server bandwidth direcly. You can avoid such linking via htaccess or web.config file depends your server OS. if you're not sure how to, feel free to contact us and we'll be happy to guide through.

Enable Gzip. It's simply to compress your page to save bandwidth usage. Take wordpress for instance, there's gzip plugin available, simply add it from admin panel.

Optimize the website structure. A bad website structure will take long time to load and cause high usage when lots of visitors are opening.

Block search engine bots. If you have checked your website logs you might have found there're many traffic generated by various search engine bots. Since the today's search engine market is mainly focus on google, yahoo and bing, we can block all other search engines in robots.txt, it will save bandwidth usage greatly.

Monitor the website usage via third party tools like google webmaster tools or Awstats and optimize our website. Such tools will tell us directly which part of our website is generating the most traffic.

Is that all? Absolutely not. You might have designed a perfect website with all optimization but still get unbearble slowless. In that case we should evaluate if we're dealing with the right hosting provider. No matter how we optimize the websit itself, if large visits are happening, a super cheap hostng plan will never be suitable to handle. So finally, get a correct hosting provider will be essential task to keep our website running healthy.

TOP cloud hosting management softwares

Cloud hosting management softwares

Cloud hosting is a popular term in today's web hosting industry. Because of the advanced technologies and outstanding performance on production server, it's always the primary consideration for heavy traffic website such as web forums, online stores and enterprise websites etc. While we're enjoying the benefits from cloud hosting service, have you ever thought how is the cloud system being managed and what kind of softwares available on the market?

What's the current situation of cloud hosting?

The current cloud hosting industry is pretty confusion if you have searched. Because of the outstanding features from the technology, many companies announced to be clouding in order to get more business from clients. Because not all clouds utilise the same hardware and software, there's big difference between the service quality.

What's the difference between a quality cloud hosting service and false/less quality service? A well built cloud product can provide complete redundancy, fall over protection, replicated cpu/ram and storage over multiple locations, etc and etc.. When we evaluate a cloud hosting provider, make sure to check out side by side.

Top cloud hosting management softwares

There're many cloud managing solutions on the internet. In case you need to know about the names, here're few of them: Onapp, Applogic, Appcore and the most well known product VMware.

Which one is the best? It's really hard to evaluate because every product has it's own advantages and their market. From the web research, it seems many services are Applogic and Onapp based. Regardless of their difference, they all have the following similar features:

  • Cloud deployment –The basic feature of such softwares. Let people setup cloud environment fastly from existing infrastructure. there're always some kind of template to follow up and convert your existing system to cloud quickly.
  • Cloud & VM management –This includes the load balancing, autoscaling, availability & performance zones, IP, networking and storage management.
  • User management –Total control of user roles, permissions, resources, limits and pricing. You can also design the customer experience with your own ideas.
  • Mobile posibility –Go to mobile is the new feature of these products. Because of the popularity of mobile device, most cloud solutions are going into this area.

Which do I love mostly? Actually I only have experience with VMware and have been fans of their products. From vmware server to workstation, they're offering great solution to both personal and enterprise business IT structure. Also, VMware offers the only common cloud infrastructure platform bridging private and public cloud resources to create a hybrid cloud architecture. Being one of the oldest virtual tech solutions, vmware is always growing with times.

For more about vmware, simple check out the official site www.vmware.com for explanation.

Who's actually leading in the business?

The top clouding deployment always belongs to the internet leading groups like IBM, Microsoft etc. The cloud computing idea is actually from such groups. Based their huge global business and the amount of data to deal with, it's necessary to introduce into cloud system and they have the abilities to!

As for cloud hosting business, the most quality service is always from some popular datacenter providers like Softlayer, Rackspace etc. Running a quality cloud hosting is pretty costly that's why it's not available via the small web hosting companies. If you see a pretty cheap cloud hosting plan, you should doubt about the service quality. Cloud hosting is mainly offerd via VPS or Dedicated hosting plans.


Useful WordPress Mysql Queries

useful wordpress mysql queries

Wordpress is completely mysql supported software. Unless you have to go to the amdin panel for every change or in case our wordpress site can't be accessed for some reason, we can use various sql queries to get problem fixed. Personally I reguarly use it to deal with spam and article revision. I will post some of the most frequently used queries in case you need it as well.

Where to run mysql query? Definitely from the phpmyadmin. Just login to your cpanel then navigate to database section then click "phpMyadmin". It will be redirected to phpmyadmin page. Now if you have multiple database created make sure to click on the right one from left navigation and it will display a list of functions on the top. We need to click on "SQL" tab and a mysql query window will be displayed. Now type into whatever queries you like and "Run", once it's excecuted succesfully it will show up the results in green words, or else red alarm is expected.

Here're the wordpress mysql queries I used often.

1. Change wordpress user password

UPDATE 'wp_users' SET 'user_pass' = MD5('PASSWORD') WHERE 'user_login' ='admin' LIMIT 1;

We can also use similar sql to change the default user "admin" to something else for security purpose:

UPDATE wp_users SET user_login = ‘newname’ WHERE user_login = ‘admin’;

2. Mass edit article author

UPDATE wp_posts SET post_author=NEW_AUTHOR_ID WHERE post_author=OLD_AUTHOR_ID;

3. Delete the revision and related info of article posting

DELETE a,b,c FROM wp_posts a WHERE a.post_type = 'revision' LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id);

4. Remove all unapproved comments

DELETE from wp_comments WHERE comment_approved = '0';

5. Delete the specific user's comment via several terms

(1) Check user's home URL and delete all it's comments:

DELETE FROM wp_comments WHERE comment_author_url LIKE '%www.example.com%';

(2) Check user's nick name and delete all it's comments:

DELETE FROM wp_comments WHERE comment_author = 'example';

(3) Check user's email and delete all it's comments:

DELETE FROM wp_comments WHERE comment_author_email = 'example@example.com';

Sometimes we need to filter some sensitive words or terms to avoid legal problems. It can be done via a simple sql query too. For example we need to replace the word "sex" to ** then we can do the following:

UPDATE wp_comments SET comment_content = REPLACE( comment_content, 'fuck', '**' );

6. Some times we might have post wrong stuff in article, if there're many places to check around, we can use the following for mass replacement.

UPDATE wp_posts SET post_content = replace( post_content, 'string_to_find', 'string_to_replace' ) ;

7. Get a list of all posters' email addresses:

SELECT DISTINCT comment_author_email FROM wp_comments;

8. Disable all wordpress plugins at one time:

UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';

9. Delete all wordpress tags:

DELETE a,b,cFROM database.prefix_terms AS a LEFT JOIN database.prefix_term_taxonomy AS c ON a.term_id = c.term_id LEFT JOIN
database.prefix_term_relationships AS b ON b.term_taxonomy_id = c.term_taxonomy_idWHERE ( c.taxonomy = 'post_tag' AND c.count = 0 );

10. Disable comment for old posts:

UPDATE wp_posts SET comment_status = 'closed' WHERE post_date < '2009-01-01' AND post_status = 'publish';

11. Replace the comment poster's address:

UPDATE wp_comments SET comment_author_url = REPLACE( comment_author_url, 'http://oldurl.com', 'http://newurl.com' );

12. Replace the comment poster's contact Email:

UPDATE wp_comments SET comment_author_email = REPLACE( comment_author_email, 'old-email@address.com', 'new-email@address.com' );

13. Delete comments if there's specific term in author's URL:

DELETE from wp_comments WHERE comment_author_url LIKE "%wpbeginner%" ;

14. Change the article author:

First we need to run following to get the IDs of all authors:

SELECT ID, display_name FROM wp_users;

For example we need to change the article auther ID to NEW_AUTHOR_ID from OLD_AUTHOR_ID:

UPDATE wp_posts SET post_author=NEW_AUTHOR_ID WHERE post_author=OLD_AUTHOR_ID;

15. Change wordpress website URL:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl.com', 'http://www.newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';

Once done, we need to run the following to edit all posts' GUID:

UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl.com','http://www.newurl.com');