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.
[su_button url=”http://asphostportal.com/WordPress-4-6-1-Hosting” style=”3d” background=”#ef362d” size=”6″ text_shadow=”0px 0px 0px #ffffff”]Best OFFER Cheap WordPress Hosting ! Click Here[/su_button]
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.
[su_spoiler title=”Security” style=”fancy” icon=”folder-1″] The main aim of premium managed hosting is to provide bulletproof security. They have a very tight layer of security on their servers, so you don’t have to worry about hacking, DoS attacks, malware, or other security issues. [/su_spoiler]
[su_spoiler title=”Expert Support” style=”fancy” icon=”folder-1″] It wouldn’t be fair to say that shared hosting providers have poor support. In fact, most companies have excellent staff who are well-trained and possess a good knowledge of WordPress. But they can’t assist you with things like performance, site functionality, WordPress errors, etc. With managed hosting support, you will get expert WordPress assistance, always. [/su_spoiler]
[su_spoiler title=”Speed” style=”fancy” icon=”folder-1″] Speed plays a significant role in site rankings and there a lot of things you can do improve it like implement a caching plugin, use a content delivery network such as MaxCDN, and reduce image sizes.
Most of the managed hosting companies out there enable content caching at the server level, so you don’t have to rely on any external caching plugins.
If you’re going with a normal plan, then you might need to use a content delivery network to improve site speed.
[/su_spoiler]
[su_spoiler title=”Daily Backups” style=”fancy” icon=”folder-1″] They take a daily backup of your site including content, data, themes, and plugins, which you can then download from the dashboard. This can save you some money, especially if you are using a paid backup or maintenance service such as VaultPress or BlogVault. They also create a restore point. In case something goes wrong, you can easily restore your site to a previous working version with just one click. [/su_spoiler]
[su_spoiler title=”Automatic Updates” style=”fancy” icon=”folder-1″] They will automatically update your WordPress Core files to the latest version, as soon as an update is released. You don’t have to pay someone extra to update your site anymore—your managed hosting provider does it for you. They also create a restore point. In case something goes wrong, you can easily restore your site to a previous working version with just one click. [/su_spoiler]
[su_spoiler title=”No Downtime” style=”fancy” icon=”folder-1″] No matter how much traffic your site gets, it will never go down. That means, if you hit the homepage of Hacker News or Reddit, you site will still be up and running without any issues. [/su_spoiler]
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? [su_button url=”http://asphostportal.com/WordPress-4-4-2-Hosting” style=”glass”]Click Here[/su_button]
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 [su_button url=”http://asphostportal.com/WordPress-4-4-2-Hosting” style=”glass”]Click Here[/su_button]
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
[su_spoiler title=”Choose the Right Hosting Plan” style=”fancy” icon=”folder-2″]
The first step in optimizing your website correctly is to choose the right hosting plan. You are fighting a losing battle if your server is taking an age to process HTTP requests and MySQL commands. Performance services such as GTMetrix will advise you of the exact response time of your server. I recommend testing the response time of your own website against similar websites. For example, if you run a photography blog, see how your server response time compares to other photography blogs within your niche. Hosting companies are not always the cause. You may be with a great hosting company but see poor response times because your chosen hosting plan is underpowered. Customers using shared hosting plans, for example, are more likely to face slow loading times as hundreds of websites are hosted on the same server. However, any type of hosting plan will suffer from insufficient RAM and CPU throttling. Therefore, you need to pay attention to what your website needs to run smoothly. Do not be a cheapskate and go for the cheapest option. Choose a hosting plan that can handle traffic spikes efficiently.
[/su_spoiler]
[su_spoiler title=”Monitor Your Plugins” style=”fancy” icon=”folder-2″]
Before you install any plugin on your website, ask yourself “Is this plugin necessary?”. Plugins are one of the biggest causes of WordPress websites being slow. The more plugins you install without research, the more likely you will face performance issues; however the sheer number of plugins you have installed is not the reason a WordPress website can slow down. Certain plugins are known for causing websites to be slow. There are many reasons for this including bad coding, calls to external servers and persistent calls and updating of your WordPress database. Pay close attention to how much CPU plugins use too. Many plugins can bottleneck your CPU due to persistent processes. If this happens, your whole server could go down.
[/su_spoiler]
[su_spoiler title=”Empty Your Trash” style=”fancy” icon=”folder-2″]
WordPress 4.4.1 introduced the WordPress trash system. Whenever content is deleted, be it a comment, post, page, media etc; it is sent to trash. From here, the content can either be restored or deleted permanently. It is effectively a fail-safe system that helps you recover anything that was deleted accidentally (in much the same way the recycling bin works in your computer). Trash can take up a lot of unnecessary room in your website’s database. The bigger the database, the longer it is to retrieve information from it. By default, WordPress will automatically delete trash after thirty days. This can be reduced by modifying the wp-config.php file. For example, you could reduce this to seven days by adding the following:
define ('EMPTY_TRASH_DAYS', 7);
You can completely disable the trash system by adding this to your wp-config.php file.
define ('EMPTY_TRASH_DAYS', 0);
[/su_spoiler]
[su_spoiler title=”Optimize Your Images for the Web” style=”fancy” icon=”folder-2″]
Images can help break up long pieces of text and can help your articles be shared more frequently on social media services; however they also take up a lot of storage. Therefore, pages that contain many images can take a long time to load. It is therefore in your best interests to optimise your images for the internet before you upload them to your website. Most photo editing applications, such as Photoshop, allow you to do this via the “Save for Web” option. A good plugin to optimize images that have already been uploaded is WP Smush.it. It utitlizes the Smush.it API to optimize JPEG images, strip meta data from JPEGs and convert GIF images to PNG. You should however be aware that the plugin uses up a lot of resources when it is converting images, therefore your website may be slow whilst it is running. If you do not want to sacrifice image quality, check out Lazy Load. The plugin ensures that images are only loaded when the area becomes visible to the user. This will greatly reduce page loading times. [/su_spoiler]
[su_spoiler title=”Enable Browser Caching” style=”fancy” icon=”folder-2″]Some of the largest files on your website rarely change. This includes CSS files, Javascript files, your website logo etc. One way to take advantage of this is to enable browser caching. Browser caching allows internet users to speed up the loading time of their favourite websites by storing a cached copy of your website locally. This reduces calls to your server and saves the user from downloading the same files again. You can enable browser caching by adding the following code to your .htaccess file:
## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" </IfModule> ## EXPIRES CACHING ##
The code above specifies how long a particular file type should be stored. Files will simply be downloaded again if they have expired.
[/su_spoiler]
[su_spoiler title=”Install a Cache Plugin” style=”fancy” icon=”folder-2″]
Caching plugins allow you to publish static HTML files instead of dynamic files. This greatly reduces the time a page takes to load as there are no PHP or MySQL commands to execute. Additional caching features include minification, caching of feeds, Gzipping, Content Delivery Network (CDN) support, and much more. Caching your pages is one of the most effective ways of improving your page loading times, with many plugins promising an improvement of at least ten times. Popular caching plugins include WP Super Cache, W3 Total Cache and WP Fastest Cache. All three plugins are available free. [/su_spoiler]
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.