Magento Database Cleaning

Magento is an excellent platform, but it unfortunately falls short when it comes to having an efficient database. When selling a myriad of products, it’s a smart idea to have a sizable database. Managing the database by performing regular log cleanings can drastically improve the performance of your website along with its latency. The following is a walk through of how to tidy up a Magento database that has become over encumbered.

For starters, it is imperative that you make a back up of all your files prior to doing anything in case something goes wrong. You can either perform an export of your database using phpMyAdmin, or you can submit a technical support request so that we can do it for you.

Magento manages several logging tables. These tables make logs of things like which products have been compared, customer accesses and other ancillary logs. Magento has a self cleaning program to clean this out regularly, but this feature is inactive by default, and most consumers wont turn it on. Here are three ways to clean out these tables. You can either access the “Log Cleaning” feature in the Magento Admin, or you could just manually do so via phpMyAdmin.

The tables below are managed by the Magento Log Cleaning function:

log_customer
log_visitor
log_visitor_info
log_url
log_url_info
log_quote
report_viewed_product_index
report_compared_product_index
report_event
catalog_compare_item

Log Cleaning through the Admin

  1. While in the Magento Admin click on System, then click configuration.
  2. In the menu on the left under Advanced click System.
  3. Where it says “Log Cleaning”, select yes to enable log cleaning, and configure the save your logs for 15 days. Then click save.

Manual Cleaning through phpMyAdmin

This is by far the most effective way to clean the logs for individuals that are more comfortable working with databases. It’s definitely quicker than the Magento tool, and it allows one to clean some of the tables that aren’t included in the Magento tool.

-Open the database in PhpMyAdmin in the cPanel Control Panel

-In the right frame, click on the boxes for the following tables:

dataflow_batch_export
dataflow_batch_import
log_customer
log_quote
log_summary
log_summary_type
log_url
log_url_info
log_visitor
log_visitor_info
log_visitor_online
report_viewed_product_index
report_compared_product_index
report_event

Look to the bottom of the page, then click the drop down box that says “with selected” and click empty.

A confirmation screen will appear, click yes, and this will truncate all the tables you just selected

Note: It can be very easy to mistakenly delete a database instead of emptying it, you should be very careful and make sure that you are selecting the correct option.

Make sure you perform this regularly. We’ve seen a 3+ gigabyte database drop to less than 100 megabytes after proper log cleaning has been performed. This kind of maintenance is very important for the performance and health of your website and needs to be done periodically.

For an automated method to clean this up regularly, you can setup a cron job by following our instructions on our post about speeding up Magento commerce.

Share

Things to Consider When Starting a Web Hosting Company

Starting up a successful web hosting company can be quite difficult if one is not properly equipped with knowledge as to how to do it. Think about it, when you start selling web space, in a sea of other people selling the same thing, how do you get customers to get their web hosting from you?

What Makes You so Special?

Most people that are going to be buying web hosting from you are not going to be as technologically savvy as you. So throwing a bunch of stats and numbers at them may fall on deaf ears. Yet you need to tell them things that will make them perceive you as being superior to your competitors. Can you offer 24/7 support? That’s a pretty big deal, and it’s something you’re going to want to mention. Can you offer 99% up time for your servers? It would be a good idea to mention it somewhere on your site. This will show the customers that you are reliable, and they can feel safer getting their service from you. Keep in mind, don’t make any promises you can’t keep. A couple of people with some bad experiences could easily be the demise of your business if word gets out.

What Should Your Prices be?

Pricing may seem like it is one of the harder things to determine, but in reality it’s not. You may be looking at some of the ridiculously low prices that some other web hosts are offering, and cringe in fear, and wonder how they can afford to do so. Often times people that offer web hosting for so cheap, have less than exemplary servers and equipment. Not to mention, people who are looking for crazy deals on the internet for a web hosting service are often times the people who have the least amount of experience and will be constantly harassing you for technical support. Don’t sell yourself short, people are more likely to respect your reseller hosting company if you have a fair and reasonable price around the range of ten to fifteen dollars per month.

Do Your Customers Love you?

This is one of the most important aspects of whether or not you will succeed. Get them excited and proud to use your brand. Give them an excellent experience, and encourage them to want to tell everyone about how great your web hosting company is. Brand recognition is very important, make sure you spend a lot of time thinking of a unique and clever name and logo, and don’t just choose something generic. The more generic your business is, the more you will blend in with everyone else.

In summation, web hosting is a very generic service, and a consumer can be overwhelmed with all the potential web hosts out there. Web hosts are a dime a dozen, and it’s up to you to get noticed. SEO, (search engine optimization) can be your best friend. If you rank high on a search engine like Google, then you have a higher chance of being seen. It doesn’t matter how good your service is, or how many people you have working in your company. If no one notices you, you will not succeed. eLief wishes you all the best of luck out there!

We at eLief offer great reseller hosting accounts to jump start your web hosting business. Feel free to post if you have any questions.

Share

Are you Making Money, or, Building a Reseller Hosting Business?

One very important thing you need to ask yourself is: Are you in this to make some quick cash, or are you doing this to build a long-term successful company? If you are not in it to do the latter, then you will greatly suffer and lose out on long term rewards.

Suppose you would like to start up a web hosting company using a reseller hosting account. You would have to do sufficient research, and purchase all the necessary utilities: a reseller hosting plan with enough resources, web design, billing system (included free on your eLief account), customer support, etc. Completing these first steps gives you a great feeling of accomplishment, since you’re now ready to take the several months of planning and turn your dream into a reality.

The Beginning Stages

This is the part where most hosting companies will fail. After several months, you become so totally absorbed into your new business that you start forgetting about your normal, daily life. When you speak with friends or family, eventually the topic of your business will come up. The first question from them will always be “How’s your business doing?”, and then occasionally “How much money are you making?”

In the early stages, that question will absolutely CRUSH any persons entrepreneurial excitement. This is normal. You’ll need to swallow your pride when you realize that the answer to that question isn’t yet what you would like it to be.

Whether you realize it or not, you’ve now set an invisible goal for yourself. You now believe that in-order to prove to the world that your hosting business is not a failure, you have to show that you have a large profit margin.

You shouldn’t get discouraged if your business isn’t an instant success. Infact, most businesses in general do not usually turn a profit for the first 12-24 months. If you’re counting on being the exception instead of the rule, then you’re setting yourself up for disappointment.

Making Money and Building a Business are Two Different Things

This is especially true for startups. The majority of new web hosts invest copious amounts of time into the startup of the business, and then if they don’t see immediate results, they abandon their business with nothing to show except debt and lost time.

Not seeing the profit and cash flow after the first 6-18 months can be a very scary feeling. That feeling is what will drive many startups to give up or sell their business. This is a huge mistake.

Perhaps an analogy will help; My wife recently has been cooking some amazing food with home grown vegetables. Think of the time and effort put into a reseller web hosting company, as the time and effort put into a garden. If you were to plant a seed and water it, fertilize it, and after a few days or weeks you don’t see any vegetables. Would you give up on it so soon? Probably not, because you can see the physical growth and see your plants slowly developing. With a business, it’s the same idea, except not as easy to see, and is on a much grander scale.

My advice to you: Don’t worry about making money in the beginning stages.

Planning ahead is imperative. It would not be wise for you to quit your day job immediately. Make sure that you have a strong business plan, and are financially secured for 6 months at the very least prior to starting out. Work on the business in your off time, and the business will succeed if the right amount of time, planning, and effort is put into it.

Don’t give up and the next time someone asks that dreaded question, your answer will feel much more admirable. Good luck!

Look out for the follow-up series of articles coming in the next couple weeks, where we will go into some of the more technical aspects and business strategies specifically related to reseller web hosting, and why an eLief reseller hosting account would be an excellent avenue for you to get started.

Share

BOTW Coupon

Best of the Web is one of the oldest and most trusted web directories, adding your website to the BOTW directory can add great SEO value and can help increase your search engine rankings, and also occasionally bring in direct traffic from the directory itself.

When adding your site you can enter the coupon code SAVE20 to take 20% off your order. The offer expires at the end of October so you will want to order before the end of this month.

Some other great directories you can look into are DMOZ and the Yahoo! directory. DMOZ is free to submit your site, but it can take a very long time to be approved. Yahoo! charges $299/year.

Share

5 Easy Tips to Free Up Disk Space on Your Server

From time to time we need to clear up disk space on our servers, whether it is to just reduce disk space to help minimize the costs and usage of backup servers, or if it’s to clean up the server and help with performance.

Here are 5 easy ways you can instantly clear up hard drive space and reduce the number of inodes on your server:

1.) Remove User Generated cPanel Backups

Many times cPanel users aren’t aware that they should delete a cPanel backup before performing another cPanel backup.  Essentially they are taking backups of backups and this can quite easily add up to several gigabytes of space just for one account. A quick and easy way to remove these is to run the following command from root:

for user in `/bin/ls -A /var/cpanel/users` ; do rm -fv /home/$user/backup-*$user.tar.gz ; done

Make sure to copy the full command exactly how it is above. This will work for cPanel hosting servers only.

2.) Audit your MySQL Databases

Not only will this free up disk space but it can greatly help with increasing the performance on your server. Large MySQL databases on sites that are receiving a large amount of traffic can really slow down a server. Many times the tables that are using the most space in a database are simply from visitor logging or caching, things that can be freed up instantly be truncating the table.

Use the following command when logged in as root to show the highest usage databases on the server:

du -k --max-depth 1 /var/lib/mysql | sort -n

This will show a list of individual databases from lowest to highest. Databases larger than 500mb can be an issue with performance so it is worth it to investigate them.

Once you have the results from the command above, it is easy to go into phpMyAdmin and find the database. Once you have clicked on the database you should sort the table size by space, clicking it twice so that it shows the highest usage table on the top.

If the table is some type of visitor logging or tracking table, it generally is okay to truncate it. The same goes for caching. Make sure to backup the database just in-case before doing so, and it won’t hurt to do a quick google search to see if that table is okay to empty. Searching for the exact term/table name usually will bring up the results you are looking for.

This is a great way to free up disk space, RAM and help increase overall server performance.

3.) Remove Installatron and Fantastico Backups

If you are running Installatron or Fantastico on your server, it is easy for the backups for these files to use up a lot of inodes and space, taking up resources and slowing down performance. Usually once every few months we will remove these for that reason. You can do so by entering the following commands:

For Fantastico:

rm -rfv /home/*/fantastico_backups

For Installatron:

rm -rfv /home/*/.installatron/backups

These are the two software installers I am familiar with, if you are using another software installer the same can be done for it if you just insert the proper location where the backups are stored. Consult with the software developer to make sure it is okay to do so first.

4.) Get Rid of Cached Yum Files

Updates from Yum usually leave some unneeded files on the server. Do some Yum house cleaning:

yum clean all

5.) Delete Failed FTP Uploads

When users are uploading files via pure-ftp and the upload either fails or is interrupted it will leave a partial file on the server. You can quickly get rid of these to clean up some disk space:

locate .pureftpd-upload | xargs rm -fv

Using the above five ways we have sometimes cleared hundreds of Gigabytes of space and doing all of the above should take you less than an hour.

Let us know your results or if you have anything to add.

Share

How To Setup Multiple Stores With Magento

Magento Multi-Store & Setting Up Multiple Magento Stores Using One Admin Area

If you want to setup multiple Magento stores and multiple domains that share the same admin area, the tutorial below will assist you in doing so. This is very useful if you have a lot of stores that share the same or related products and you wish to manage it from one central location. You will also be able to track your sales and customers without having to login to the admin area of each website.

With the latest release of Magento Commerce it is much easier to set this up than it was in previous versions. Before it required you to modify the index.php file to handle your different domains pointing at different stores and various other complicated modifications. With Magento 1.4.x it is now much easier. The new index php contains the following code:

$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';

It checks two variables(code & type) and then uses them to run Magento. With the new code you’re able to set which store is supposed to be running under your main domain directly within your virtual host definition(root access required) or for our shared hosting and cPanel hosting customers you can actually now use .htaccess to accomplish this.

Creating your additional stores

If you haven’t already done so, the first thing you will need to do is setup your second store in the Magento admin area:

  1. Login to the Magento admin area.
  2. Go to the Catalog tab, then select Manage Categories.
  3. Click the ‘Add Root Category’ button on the left.
  4. On the right, for the Name, enter your secondwebsite.com. In the dropdown set Yes for both ‘Is Active’ and ‘Is Anchor’.
  5. Click on ‘Save Category’.
  6. Next you should go to the ‘System’ tab and select ‘Manage Stores’.
  7. Click the ‘Create Website’ button.
  8. For the Name enter your Secondwebsite.com, and for the ‘Code’ you should enter secondwebsite. You’ll be using this value later so make sure your note it down somewhere.
  9. Click ‘Save Website’.
  10. In the same area, click on the ‘Create Store’ button.
  11. For the Website, select your Secondwebsite.com from the dropdown. For the ‘Name’, you can enter Secondary Store. For the Root Category, select your now created Secondwebsite.com from the dropdown.
  12. Click the ‘Save Store’ button.
  13. Next click on the ‘Create Store View’ button.
  14. For the ‘Store’, select Secondary Store from the dropdown menu, make sure it’s for the created Secondwebsite.com. For the Name, you can enter English. For the ‘Code’, you should enter secondwebsite_en. For the Status, select ‘Enabled’ from the dropdown menu.
  15. Click on ‘Save Store View’.
  16. Next you will need to go to the ‘System’ tab and select ‘Configuration’
  17. For ‘Current Configuration Scope’ (located near the top left), change the dropdown menu from ‘Default Config’ to Secondwebsite.com.
  18. Select ‘Web’ from the left sidebar under the ‘Genera’l headline.
  19. For both the Unsecure and Secure sections, uncheck the Use default box next to the Base URL item, and enter the URL for your store, e.g. secondwebsite.com. Make sure to include the trailing backslash.
  20. Click the ‘Save Config’ button.

You’re almost done so hang in there!

Once you are finished creating the store, if you have not added your second domain as an add-on domain you will need to login to your cPanel account with us and create it as an Add-on domain now. Once you have done this you then need to copy your index.php and .htaccess file to the created directory for your add-on domain.

After copying over your index.php file, you should replace the following lines of code in the index.php file located only in the new add-on directory:

Replace this line:

$mageFilename = ‘app/Mage.php’;

With the following:

$mageFilename = ‘../public_html/app/Mage.php’;

Next you will need to either use the VirtualHost method(VPS and dedicated servers) or the .htacess method (for regular magento hosting / shared hosting accounts).

Using VirtualHost:

To set this up using the Virtualhost method you should simply add the following lines within your VirtualHost definition file:

SetEnv MAGE_RUN_CODE "base"  #Put your main/base website or store code here.
SetEnv MAGE_RUN_TYPE "secondwebsite"  #Here you should put 'secondwebsite' if the URL of the additional store you are adding is secondwebsite.com.

Using the .htaccess method:

If you do not have access to the virtual host file and are not a VPS or dedicated server customer, you can still use .htaccess for this.

In your .htaccess code you will need to define your main and secondary websites. For example if the URL of your main/base website is base.com and the URL of your second website is secondwebsite.com you should put the following code in your .htaccess


SetEnvIf Host .*base.* MAGE_RUN_CODE="base";
SetEnvIf Host .*secondwebsite.* MAGE_RUN_TYPE="secondwebsite";

You are, of course, not limited to using just 2 websites. To add additional stores you would simply add the additional lines of necessary code:


SetEnvIf Host .*thirdwebsite.* MAGE_RUN_TYPE="thirdwebsite";

etc.

You should now be all setup using Magento multi-stores and have multiple stores with one main admin area in Magento, without messing around with the code and the other previous lengthy methods :) .

If you have any questions, additions or issues with this feel free to comment.

Share

How to Install ocPortal

Installing ocPortal and other software on eLief is easy, we’ve included a short guide on how to do this below:

  1. The first step is to login to your cPanel account with us.
  2. Once you are logged into your cPanel account you will need to find the Software/Services section and click on “1-Click Applications Installer”.
  3. This will bring up a large list of applications, under the left hand side look for ‘Content Management Systems’, click ocPortal -> Install this Application.
  4. The on-screen instructions will guide you through the installation easily. It will automatically create your database and folders, download and update data and finalize the installation.
  5. Your ocPortal install is now ready! Use the password and username to login to ocPortal and start customizing your site.

We are the official ocPortal hosting partner and support all requirements. Our applications installer is available on all of our web hosting services and cPanel reseller hosting plans. The installer is also not limited to ocPortal and can install over 50+ applications, including our popular magento hosting plans.

Share

What Is Magento Hosting?

Magento Hosting

Magento Hosting is an extremely popular ecommerce solution, so it’s perfectly understandable that people are looking for hosting packages which are optimized accordingly. Just as specialized blog hosting companies, forum hosting companies and others have managed to create subniches as far as hosting is concerned, “Magento hosting” will be a term more and more people will be using.

There are quite a few cpanel reseller hosting companies, for example, with hosting packages which have been optimized for Magento and if that’s the case, you will probably find a descriptive sales page on their website which does all of the explaining. If the hosting company does not have a link to a Magento hosting package on its homepage, you can still determine if it could represent a Magento hosting solution by:

Analyzing Magento’s System Requirements

First of all, you need to go with a Linux box, this much is certain. Magento supports Apache 1.3.x, Apache 2.0.x as well as Apache 2.2.x, so most hosts would “qualify” from this perspective. Now as far as PHP is concerned, there are certain things that you need to keep in mind.

Magento is compatible with PHP 5.2 (go with a memory limit of 128 Mb at the very least) but be sure to make sure that Safe_mode is off. There are also certain required extensions which you need to remember about: simplexml, hash, PDO_MySQL, DOM, mcrypt, curl, SOAP, GD and iconv.

Your server needs to be able to run cronjobs and it also needs to be able to override options as far as the .htaccess file is concerned. And finally, when it comes to SSL, you need to know that it doesn’t support self-signed certificates.

Which Hosts Qualify?

Most companies which offer Linux hosting (i.e. cpanel shared hosting, cpanel reseller hosting, unlimited domain hosting , etc.) solutions will be able to cater to your needs, but it’s extremely important to make sure that your package supports Magento before making the payment. If you’re not 100% sure, contact the sales department of each host and ask them.

A lot of companies have a live online support interface, so you’ll be able to find someone who can answer this question right away and without even picking up the phone. If an online support interface is not available, you can simply email them or (if you need a response ASAP) give them a call. Most good cpanel reseller hosting companies as well as unlimited domain hosting companies offer 24×7  support, so getting in touch with someone should not be complicated at all.

It’s extremely important to choose only companies with whom you’re 100% comfortable. On the one hand, it is true that cheap web hosting packages are always tempting, but when it comes to Magento hosting, going with providers that have proven themselves time and time again is definitely the best long-term solution.

After all, would you rather save a few dollars here and there but face the risk of your site being offline a lot? The consequences are more than obvious: less traffic, ultimately fewer sales, you’d probably end up losing considerably more money than you’ve managed to save by going with the cheapest option. Better to spend a little bit of extra money but know that you’re working with true professionals.

Magento Hosting Mistakes?

Unfortunately, there are a lot of mistakes associated with Magento hosting which could cost you. Leaving the previously mentioned mistake aside (always going with the cheaper option), there are quite a few other things which could cause problems.

First of all, not monitoring your site on a daily basis is definitely not a recommended practice. You never know what could go wrong, so keeping an eye on things will definitely not hurt. Maybe your hosting companies will upgrade one thing or another and that will interfere with Magento, you just never know. As soon as you notice a problem, contact your host ASAP and don’t forget to mention that you’re running Magento. A good Magento Web hosting support representative will be able to determine the cause of the problem quickly and will make the necessary changes within moments.

Don’t forget to be careful when installing other applications on your server. There are instances where certain scripts or applications can interfere with Magento. It’s not uncommon to modify your settings in order to be able to run a certain application, only to realize that the new settings caused problems with Magento afterwards. Anyone makes mistakes and, once again, that’s why always monitoring things is recommended. If you follow these simple guidelines, finding a great Magento Web hosting company and running a profitable Magento website will be a piece of cake.

Share

High Performance Web Hosting Upgrade

As a continued effort to improve our service for you, we will be upgrading our servers on Wednesday, August 5th. The new servers will include a major hardware upgrade for both improved performance and increased disk space allowance. All old servers will remain active while the new DNS propagates, so no actual downtime is expected. A full press release will be released later this month detailing the new enhancements.

Some benefits of this upgrade include:

  • New high performance hardware
  • Dual Intel Nehalem 5520 Processors, 8 Cores (16 Cores displayed with Hyper Threading enabled)
  • 12GB DDR3 RAM (Noticeable improvement over current DDR2 RAM)
  • Caviar Black Hard Drives – High performance drives w/ dual processors per each drive. Greatly improves disk i/o performance(A key factor in dynamic and database intensive websites & applications).
  • R1Soft CDP Backup’s – You will now be able to restore backup’s right from your cPanel control panel. It includes daily and hour-by-hour restore points for you to choose from along with snapshots.
  • Increased disk space and bandwidth upgrade’s for all web hosting plans, free of charge. Upgraded plans can be viewed directly on our site at http://www.elief.com/web-hosting.php or under our Magento Hosting plans.
The migration will begin around 8:00PM EST on 08/05/2009. Your new server IP will be 206.123.100.130. Those with dedicated IP’s will also receive a new dedicated IP, which you will be able to see from within your cPanel account.

Feel free to let us know if you have any questions regarding the upgrade or migration, through our helpdesk, or on twitter @meLief. We thank you for your continued business.
Share

All hosting blogs are not created equal.

A blog from eLief? Does the world really need another blog? We think so. Let me tell you why – eLief is at the epicenter of an exciting transformation in the hosting industry. Did you know your average hosting company is still using the same technology that was around 10 years ago? Not here. eLief runs state of the art technology using LiteSpeed web server. LiteSpeed is an advanced web server that processes pages up to 8x faster, reduces server loads for better performance with less CPU and memory consumption, and also allows us to perform servers updates, maintenance, and restarts without downtime. We are here to revolutionize the industry and you will only continue to see more big things coming from us. LiteSpeed hosting is just the beginning.

Ok cool, so what..you created this blog just to talk about your services? Not exactly! This blog will serve as a great way to communicate and interact with our readers and customers, gather opinions, collaborate with industry veterans, or to just come and read the mindless ramblings from the creators of eLief.

The scoop you can get from here:

  • Upcoming news and insider perspectives
  • New feature announcements
  • How-to tutorials
  • Webmaster tips & techniques.
  • In-depth information about what happens behind the scenes at eLief.
  • Why eLief is the best hosting company in the galaxy and how it will come to rule the world. Just kidding, no but seriously.

To start things off, during the month of April, we will be focusing on tutorials and information about running a Magento Commerce store for all our magento hosting and ecommerce customers.

Technorati Profile

Share