CheapWindowsHosting.com | Best and cheap WordPress hosting. The Error Establishing a Database Connection is an issue that you may have suffered more than once when surfing the Internet. Since this common error has gotten a lot of webmasters in trouble, we make this guide on how to fix WordPress Error Establishing a Database Connection. Before everything, let’s have a quick view on what the issue is and why you get it.
The Error Establishing a Database Connection is a common issue that has happened to a large number of WordPress websites, which means WordPress cannot establish a database connection on the local host. Once suffering this error, your website is down as well. Meanwhile, you will lose more and more traffic thereby taking a knock from the disaster.
Best OFFER Cheap WordPress Hosting ! Click Here
The main reasons that cause such common error are: You may have added extra space to the username, database name or password; your database login authentication has been changed without your permission; the database has crashed or unresponsive; or something more that has not been detected. No matter which reason brings trouble to you, you can refer to the following terms of settlement to make a hit.
In addition to suffering this error on the website front end, you may probably run into the same issue on the website back end. If this is the case, you are required to fix the problems that occur to the database. In fact, WordPress enables automatic database problems repair, which helps you fix the Error Establishing a Database Connection with ease.
Go to http://yoursite.com/wp-admin/maint/repair.php and copy & the given shortcode into the wp-config.php file.
define('WP_ALLOW_REPAIR', true);
If you has installed WordPress via control Panel, then you need to log into cPanel and go to Files > File Manager. Pitch on Document root for your website and click Go button to access to the File Manager interface. Find out wp-config.php file from a list of options and add the above-mentioned shortcode to this file. Once saving all changes, you need to go to http://yoursite.com/wp-admin/maint/repair.php again and then the page should be like the following screenshot.
Click the Repair Database button as required and check if there is any problem with the database. This process will take you a while and then presents the checking results to you. If there is a need to optimize the database, you can click the Repair and Optimize Database button to achieve the goal. However, if this method doesn’t work, you need to turn to other solutions.
The wrong database login credential is also a reason to Error Establishing a Database Connection issue. To check if there is something wrong with the database login details, you are required to open the wp-config.php file and focus on database username, password, hostname and some other details, which should be like the following screenshot. The extra space and spelling mistakes are the main causes that make database unable to connect to the local host.
define("DB_NAME", "Your DB Name"); define("DB_User", "Your DB User Name"); define("DB_PASSWORD", "Your DB Password"); define("DB_HOST", "Your DB Host"); define("DB_CHARSET", "Your DB Charset");
If everything is correct, you should turn to the code define(‘DB_HOST’, ‘localhost’);. The ‘localhost’ can be changed to your host’s value. However, if your website is developed with asphostportal.com the localhost is fine for you.
In most cases, the database address is also the IP address. Thus, you are able to replace the ‘localhost’ to IP address.
define('DB_HOST', 'your IP address');
If the MySQL database user privileges are limited, then the database cannot connect to the local host. The unique way to solve this problem is to reset database user information, including username and password. Log into cPanel > Files > File Manager and find out wp-config.php file. And then, replace the existing database username with a new one and reset the password as well.
Since the MySQL server is overloaded too much traffic, then the server may not be responsive. It commonly happens to the websites hosted on shared hosting solution. Thus, if you are running a large website and keeping up-scaling it, you need to turn to a VPS hosting solution or dedicated server.
Besides, the most convenient way to solve that issue is to contact your hosting provider and ask if your MySQL server is non-responsive. If so, the web host may help you solve the problems as soon as possible.
However, if you want to deal with the error by yourself, then you can log into cPanel and create a new file via phpMyAdmin. Name this file as whatever you want and make it in .php extension. And then, you are required to copy and paste the following code to the newly created file.
<?php $conn = mysql_connect('localhost', 'root', 'password'); if (!$conn) { die('The database cannot be connected with the exception: ' . mysql_error()); } echo 'The database is connected successfully!'; mysql_close($conn); ?>
After saving the file, you need to check if runs well by entering the URL http://yoursite.com/thenewfile.php. If there is a successful connection message shown to you, you have fulfilled the task.
CheapWindowsHosting.com | In this post we will explain you How To Improve Your SEO With Robots.txt and Canonical Headers.
Search engine crawlers (aka spiders or bots), scan your site and index whatever they can. This happens whether you like it or not, and you might not like sensitive or autogenerated files, such as internal search results, showing up on Google.
Fortunately, crawlers check for a robots.txt
file at the root of the site. If it’s there, they’ll follow the crawl instructions inside, but otherwise they’ll assume the entire site can be indexed.
Here’s a simple robots.txt
file:
User-agent: * Allow: /wp-content/uploads/ Disallow: /
User-agent: *
means the rule applies to every crawler.Allow: /wp-content/uploads/
allows crawling through your uploads folder (images) and Disallow: /
means no file or page should be indexed aside from what’s been allowed previously. You can have multiple rules for a given crawler.This rule lets crawlers index everything. Because nothing is blocked, it’s like having no rules at all:
User-agent: * Disallow:
This rule lets crawlers index everything under the “wp-content” folder, and nothing else:
User-agent: * Allow: /wp-content/ Disallow: /
This lets a single crawler (Google) index everything, and blocks the site for everyone else:
User-agent: Google Disallow: User-agent: * Disallow: /
Some hosts may have default entries that block system files (you don’t want bots kicking off CPU-intensive scripts):
User-agent: * Disallow: /tmp/ Disallow: /cgi-bin/ Disallow: /~uname/
Block all crawlers from a specific file:
User-agent: * Disallow: /dir/file.html
Block Google from indexing URLs with a query parameter (which is often a generated result, like a search):
User-agent: Google Disallow: /*?
Google’s Webmaster tools can help you check your robots.txt rules.
Crawlers see your site the way you do, including loading content from CDNs which means that your images are being pulled from CDN and as such google won’t be touching origin server to index your images since origin is not used any more to deliver your image files.
User-agent: * Allow: /wp-content/uploads/ Disallow: /
Make sure this robots.txt rule goes on your CDN, not your origin server.
functionwpseo_cdn_filter( $uri) { returnstr_replace( ‘http://domain.com’, ‘http://cdn.domain.com’, $uri); } add_filter( ‘wpseo_xml_sitemap_img_src’, ‘wpseo_cdn_filter’);
And update your existing sitemaps since above code will produce different urls for images.
Here’s a sample .htaccess configuration for your origin server:
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|webp|html)(\.gz)?(\?.*)?$"> <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule .* - [E=CANONICAL:http://%{HTTP_HOST}%{REQUEST_URI},NE] RewriteCond %{HTTPS} =on RewriteRule .* - [E=CANONICAL:https://%{HTTP_HOST}%{REQUEST_URI},NE] </IfModule> <IfModule mod_headers.c> Header set Link "<%{CANONICAL}e>; rel="canonical" </IfModule> </FilesMatch>
Purge CDN to even out headers on CDN. To check and confirm canonicals are applied to CDN assets as well use CURL as follows:
$ curl -I http://cdn.domain.com/path/to/file.html HTTP/1.1 200 OK Date: Sat, 27 Apr 2013 06:06:06 GMT Content-Type: text/html Connection: keep-alive Last-Modified: Sat, 09 Feb 2013 01:02:03 GMT Expires: Sun, 05 May 2013 11:12:13 GMT Link: <http://cdn.domain.com/path/to/file.hmtl>; rel="canonical" Cache-Control: max-age=604800 Server: NetDNA-cache/2.2 X-Cache: HIT ALL DONE!
CheapWindowsHosting.com | Are you currently setting up your website for your new online store and would like to make it safe, legible for your customers and compliant to the rules of financial institutions involved, such as credit card companies? There are some best practice rules ready for you.
ASPHostPortal.com aims to provide customers with affordable yet reliable and lightning-fast silverlight 6 hosting packages. Their servers and staff are both located in the USA. Their company has hosted 60,000+ websites over the past four years. With 99.99% Uptime and 30 Day Money Back guarantees your satisfaction is guaranteed. Combine that with super fast and friendly 24/7 support and it won’t be long before you are smiling.
CheapWindowsHosting.com | Cheap and affordable WordPress hosting. Let’s face it: running a WordPress blog or site is no easy game. You have to take care of all the content, marketing, site design, social media, and so forth. But before you do that, you have to make sure your WordPress site is running smoothly and your current hosting provider isn’t giving you any headaches or issues.
Today, most of the web hosting companies out there focus on providing affordable solutions. And that’s a great solution if you’re just getting started. But for a medium-sized or business site going for high-quality hosting is a better alternative.
By quality hosting, I mean managed hosting, which is specifically created for WordPress users. This new breed of managed WordPress hosting is becoming an increasingly popular option among WordPress bloggers and developers. It all started with WordPress.com, but now there are numerous players in the market.
If you’re in a hurry, here is a quick comparison of 3 top fully managed WordPress hosting providers:
ASPHostPortal.com | HostForLIFE.eu | DiscountService.biz |
From $5.00 | From €3.00 | From $7.00 |
Host Unlimited Sites | Host Unlimited Sites | Host Unlimited Sites |
SQL Server 2008/2012/2014 | SQL Server 2008/2012/2014 | SQL Server 2008/2012/2014 |
ASP.NET 3/4/4.5/5 | ASP.NET 3/4/4.5/5 | ASP.NET 3/4/4.5/5 |
Full Trust | Full Trust | Full Trust |
Go to ASPHostPortal | Go to HostForLIFE | Go to DiscountService |
Managed WordPress hosting aims at providing faster loading times, better security, and expert WordPress support. But it’s a bit costlier than shared hosting companies. Their servers are configured to provide better and faster WordPress performance.
In this article, I am going to provide some basic information on the 8 most trusted and best WordPress Managed Hosting Services, so you can make an educated decision about what’s best for you and your business.
Managed hosting is specifically designed and optimized for WordPress websites. In other words, it takes care of all the technical aspects of WordPress for you, allowing you to focus on creating and sharing great content. You don’t have to worry about site updates, site speed, up-time, or anything like that.
Many hosting companies use their own CDN and server level caching, so you don’t have to rely on cache plugins such as W3 Total Cache or WP Super Cache. This type of hosting is perfect for those who don’t have any technical skills or time to manage the server.
CheapWindowsHosting.com | Cheap and Reliable Windows hosting. If you want your business to have more presence on the internet then you need to understand how SEO works and how it affects your search engine ranking. SEO stands for search engine optimization and is used by Google and other search engines to determine where a website ranking when a search is conducted. It is similar to a popularity contest because it is really about how popular the website is based on certain criteria that search engines look for. One of the newest search criteria is using social media for SEO purposes and if you are not using Instagram for this then you’re missing out on a great opportunity
You need to let people know that your Instagram account is for your business first and foremost. Never use a personal Instagram account for your business purposes, as it won’t count towards your search engine ranking. You also want people who visit your profile page to know that it is for your business and not a personal account. You also need to be clear about what your company does and what you have to offer customers. It is also important to stay true to your brand by not posting too many non-business related photos as this can confuse your customers.
Are you looking for the best and cheap WordPress 4.4.2 Hosting? Click Here
Because Instagram is a photo and video based image site it very important to have a great description for the pictures and videos you post. This is one way to boost your search engine ranking by using targeted keywords that describe the product or service you are highlighting in the picture. The worst thing you can do is to post a photo that has no explanation because even if it’s shared there are no keywords for search engine crawlers to find. It is better to have at least a one word description rather than having none at all.
One way to associate your photos with your business is by using hashtags to use as keywords for your products or services. This is a great way to get your business trending and search engines are now also looking for hashtags as part of the SEO ranking. One thing to remember is that you don’t want to use too many hashtags as it can be overkill. Only use a few good keywords for hashtags and leave the rest of the characters for the description of the product.
Any business owner needs to have a presence on social media in order to boost their SEO ranking and to get more traffic to their website. If you are not happy with your company’s SEO efforts then you definitely need to get on board with Instagram and start posting photos as soon as possible. Just make sure you always have a description for your photos and use hashtags to take help with your company’s search engine ranking. You also want to have a set theme for your account and never use a personal account for your business.
The Best and Cheap WordPress 4.4.2 Hosting Click Here
Even if you don’t use Instagram for SEO purposes you should still have an account. Many people use social media platforms as a search engine and if you are not using it then you are missing out on traffic that can be diverted back to your site. Remember the more Instagram followers you have the more traffic you can get for your business. There is really no reason why you are not using Instagram to promote your business.
CheapWindowsHosting.com | Today, I would like to share with you thirteen quick tips on how you can optimize your website and decrease page loading times. If you follow these techniques and best practices, your website will load much quicker. The time it takes your website to load influences how successful it will be. If your website is slow, visitors will turn away in droves. They might even click the back button before your website loads. Website performance will also influence your rankings in search engines. In addition to being ranked higher, many website owners report seeing an increase in search engine spider crawling after speeding up their design.
Before applying these techniques to your website, I encourage you to check the speed of your website using a free performance service such as GTMetrix, YSlow or Google PageSpeed Insights. These services will inform you of your page loading time and the overall file size of your page. They also offer tips
ASPHostPortal.com was launched in 2008. They are one of the best Windows Hosting in United States is ASPHostPortal.com. This company currently supports Windows Server 2012 hosting with ASP.NET 5/ 4.5 / 4.5.1 / 4.5.2, MVC 5.1 / 5.1.1 / 5.1.2/6, Visual Studio 2012, WebSockets, IIS 8.5, Wordpess 4.4.1 and support the latest Microsoft technology. All of its Windows hosting services are 100% compatible with ASP.NET 5. The price of ASPHostPortal.com ASP.NET 5 hosting packages is quite competitive, especially the Host One which we may recommend most here. Going through this promotional link directly and you will get FREE DOMAIN or DOUBLE SQL SPACE, the Host One Windows hosting package is $5.00/mo. This company offers money back guarantee if any of the clients fail to get the desired results. If the company does not work up to the expectations in a certain month, and the valid refund period is 30 days. In addition, the customer service is based on US and the representatives are working 24/7.