Importing Large Sql files – Simple way to switch Web Host

Many times people are not satisfied with a particular web host and move to other web host in search of better services. Some Web Hosting Service Providers provide free service to move your website from old host. But its not the case always. So, you should know the ways to move your data from one host to another. WordPress based website has simple export-import option to move websites. You can even move website using export-import option of “php my admin” which is provided by almost all web hosts. However these options do not work if the size of sql file is too large (generally larger than 50 MB). In such case you can you BigDump file import option. Just follow the steps given below
alright, so now all what you gotta do is to follow these steps:

1) If you are using WordPress then transfer all files of WordPress folder (i.e. your website folder in the old host) to the new host. Here I assume that you know how to create database and database user in new host (generally it is same for every host, web interface can vary). You can even install a new copy of WordPress but it should be avoided as it will not restore the changes made in the script of your theme. Also copying will contain all pictures you have uploaded for the website.
2) Download the BigDump script.
3) open BigDump.php with any text editor. Edit your MySQL connection information.

$db_server = ‘copy here’;
$db_name = ‘copy here’;
$db_username = ‘copy here’;
$db_password = ‘copy here’;

Replace the word “copy here” with appropriate information. Generally value for “$db_server” is localhost. You can get all this information from wp-config.php file in WordPress folder.
3) Make a directory named “dump” in the root folder and copy “BigDump.php” file to this folder through FTP.
4) Copy your .sql file in the same “dump” folder through FTP.
5) Type “http://www.yourwebsitenamehere.com/dump/bigdump.php” in the web browser. You will get screen looks like this

BigDump file import

6) If you have already transferred your .sql file in the same “dump” folder then the part will be automatically selected and you just have to click “start import“. Otherwise you can upload your sql file (only upto 2MB size in case of browser upload) here. But its better to transfer file first through FTP (step 4) as here you can upload file of any size.

7) You are done now. You will get a message of successful transfer.

Successful trasfter of Sql file through BigDump

You are done now. Enjoy looking same website at separate place.

Are you bankrupt because of loss in the business

“Probably the worst myth about bankruptcy is that you need to be flat broke before you should file,” says Sacramento bankruptcy attorney Gerald B. Glazer. “It is not good to wait until creditors are knocking on your door,” according to Glazer. Planning can prepare you for a bankruptcy that causes the least amount of financial disruption. If you are considering to declare yourself bankrupt, you should take some advice from the experts. Proper planning will help a lot.

Virtual Private Server (VPS) Web Hosting

Many web hosting companies are providing the virtual and dedicted servers as hosting option. This post is all about virtual private server (VPS). To know why VPS and dedicated servers are required please read this article – Ways to reduce the CPU usage. Virtual Private Server (VPS) is also known as Virtual Dedicated server (VDS). It is a mediator between dedicated web hosting server and shared server. A Virtual private server is a single physical web server which is partitioned into several “virtual web servers” via a special application. The virtual web servers still share the physical web server resources like memory and disk space. Although it is a part of shared web hosting server but its features keep them close to dedicated server.

Why go for VPS/VDS
Dedicated server has excellent features but it is available at high cost. Those who cannot afford the dedicated server can opt for second best option that is VPS. Here main server unit is divided into subparts and individually distributed among customers. By principle, running virtual private server is possible even on a particular dedicated system. Once the division of main dedicated server is made and its converted to virtual private servers, each VPS can have separate operating system and can reboot separately.  A physical web server helps to boot each virtual private server using a disk image.

Just like shared hosting, the owners of the VPS on any particular dedicated web hosting server share common features like bandwidth (data transfer), the disk space, the memory allocation, various applications, software, security programs. However there is limitation of usage of resources by each customer. Here, the same kernel is shared between different virtual private servers and the virtualization means the resource and space of individual owner cannot be influenced and affected by others sharing the same server.  Virtually you are the owner of the server (I mean to say that shared part of the server) and you can do anything whatever you want with your virtual server. There are software which help in creating the environment of virtualization and give an user the experience of its own virtual machine.  Although the virtual servers are present on the same physical web server but they don’t share applications, sofwares and other directories. Owners have options to choose only those software and applications which they need to run their websites. You can restart your virtual machine (server) after installation of particular software or any other changes. The main advantage of such division of the main web hosting server is that the problems of one of more virtual hosts don’t reflect in others. Therefore unless your virtual server is affected your website will run smoothly.

Virtual private servers are worth considering because of following reasons
Root Level Control: You will have full control on your virtual server. Just like dedicated web hosting servers, you can install, delete and modify the codes of any software and applications. You can create new accounts and give them appropriate permissions. You can make use of many features reserved for dedicated servers like database servers, FTP servers, mail servers and others. Plesk and cPanel are avaible to assist people with less computer skills.

Low Cost: You will get the experience of dedicated server at low cost.

Enhanced Security: Each virtual private server gets better security and not gets affected by neighboring corrupted servers which make the server more stable. Such subdivision of the server accounts reduces the risk of antagonistic attacks like Dos attacks from alternative users. It also protect from hackers as their entry into files are restricted by you.

Flexibility: You can choose which application and software you need, which OS (Linux or Windows) to use etc. However some web hosts provide only Linux based servers.

There is nothing in this world which is perfect and VPS is not an exception. Running virtual server needs knowledge of various applications and programming/coding which helps in successful running of such servers. Lack of technical skills can result in disaster if your host is not good in providing support services. Along with this problem there are applications and software which are common for all virtual hosting servers. Over-utilization of these resources by neighboring virtual servers may influence your virtual server which can affect the bandwidth and the memory allocation and page loading.

Ways to reduce the CPU usage

Websites on shared hosting suffer a lot if they have high CPU usage. It increases the load time of the webpages and the account can be terminated for this reason. The main reason for this problem is that the shared servers have many websites running simultaneously. If a particular website is using lots of CPU then it may trouble other websites running on the same server. High CPU usage can be because of high traffic, bad html codes or bad plugins. Following are the ways to optimize the website (specially those which are based on WordPress) to reduce CPU usage.

  1. You should regularly repair and optimize the SQL database. You can do it through cPanel or phpMyAdmin. How to optimize SQL database?
  2. Plugins (with poor PHP scripts) are the main cause of problem in most of the cases of poor WordPress based websites. It unnecessarily increases the communication time between database and PHP scripts. It loads each time whenever your website loads.  Deactivate all plugins that you don’t need or that are not coming from a trusted source. Don’t keep the unactivated plugins. Just delete (available in wp-content/plugins)
  3. Try to avoid use of images,video and flash objects. It increase the time to load a particular page and utilize memory. Images can be reduced in size by using professional softwares like adobe photoshop. The images can be reused for posts on similar topics. WordPress store all images at one place in wp_content. You can also use FTP to transfer you images here which you can use to add in posts.  You can also use links to add images .
  4. Using Google Search also reduce the CPU work as the searches is performed at Google server. Additionally, It also give chance to earn money.
  5. Only summaries should be shown in the feeds. To select this option go to Settings->Reading, select use Summaries in Feeds
  6. Use caching plugins. Some good trusted caching plugins are WP Super Cache and W3 Total Cache. Caching greatly improve the loading of your page and reduce CPU usage.
  7. Try to avoid getting unnecessary e-mail notifications that you really don’t need. It unnecessarily put pressure on server. For example if commnts e-mail is opted, a mail will be sent each time a visitor comments. If you really don’t read those comments in mails why ask your mail server to send you mails.  To turn it off, go to Settings->Discussion.
  8. Turn off any formatting options. Go to Settings->Writing. Uncheck both formatting options. “WordPress should correct invalidly nested XHTML automatically” is more serious out of these two.
  9. Use less number of posts on each page. Similarly less number of feed should be chosen. To select it go to Settings->Reading.  Reduce the number here.
  10. Try to avoid use of badly coded related post plugins.  Related post plugins have many issues. Even good plugins in this category like ‘Yet Another Related Posts Plugin (YARPP)’ has many issues. Many web hosts have banned its use in shared hosting plans. It resulted in high load of CPU and increased query time. Think before using them
  11. Always update everything. If there is an update available, you should always go for it. Updates contain security improvements and bug fixes.
  12. There are number of plugins which offer feeds from various source like twitter tweets, facebook updates, feed of other stie, RSS widget. All these plugins try to gather information from external source every time a visitor comes to your site. You should try to keep such feeds minimum.
  13. After updating the WordPress psots the old revision of the posts remain there in the database which increase the database size. You should remove old revision of the posts from database.
  14. You should avoid changing CSS, JS and PHP without knowing the event. Excessive formatting of these files to include more and more things (visual formatting as well including external source)  increases the loading time of your webpages.  If you have added something on your PHP to load from external source and the external site is down then your page will also load slowly.
  15. Try to avoid leaving ‘writing post pages’ open without using them. It will keep your site open for such period of time. WordPress ‘auto save ‘ option use server resources and which results in higher CPU usage. Posting article through email and word also increase the use of resources. Best way to post article is write in the word processing software like wordpad, Microsoft Work and openoffice and subsequently paste it in the WordPress for publication.
  16. All web hosting companies has cPanel which has option to see which of the queries are taking longer time to respond. Whenever a visitor open a webpage a query is sent to the database to retrieve the data/information contained in that post. Queries that are taking longer time increase the pressure on server and your site will load very slow. You should always look for the logs which indicate which of your queries are taking longer time to responds.  Subsequently you should change the script to repair PHP scripts.

If you are exceeding the allowed CPU then there is no hope for you to continue with current web host. If you have followed above recommendations but still facing the problem of high load then high traffic is the main culprit and you need more resources to continue smooth running of your website. In simple term high traffic need more CPU usage and high bandwidth which is not possible in shared hosting. If you have very high traffic, better move to virtual private hosting server /virtual dedicated server (VDS/VSH)) or dedicated server. Off course you have to pay higher, but there is no other way-out. If you want to compensate the money paid for hosting then you can monetize your traffic by adopting online money making strategies.

This particular post will be updated on regular basis to include more ways to reduce CPU usage. Guys just add your knowledge in the comment section.

How to repair and optimize SQL database?

SQL database stores the information of your site which can be used to take backup your website. Changes made to the website like posting articles, comments etc update the SQL database. With time errors may results in the database. There are two easy to repair and optimize the SQL database.

  1. Using ssh command: mysqlcheck -auto-repair -u`whoami` -p -A -o
  2. Use cPanel: Go to PHPMyAdmin through databases section. Select the database you want to repair or optimize. Select all tables which include your posts, categories, comments, links, users, etc by using ‘Check All’ option at the bottom of the tables. Choose repair option from right side of the check all option. For optimization, select the optimize option in the menu after repeating above steps.