Posts

WordPress: “Error Establishing a Database Connection”

Web hosts always blame WordPress – I want to create a faux WP site sometime and have a non-WP error so when I contact them and they tell me it is WordPress I can call BS.  Is that wrong?

I consider myself a fairly well versed user of the WordPress – I’ve been a web developer for over 10 years now and a bit of a technologist my whole life.  But there is something about a rash of emails from your website monitoring service to get your head spinning.

Yesterday – this happened to me.  So, I do what every level headed web dude would do.  I create a support ticket with my host and say “Hey – what did you guys do to my site!”.  I knew it wasn’t them and I knew they were going to blame it on WordPress.  They always do.

WordPress Database Connection Error

Anyway…back to fixing the issue.  So – about 4-5 times out of 10 when I refreshed my site I was getting the “Error Establishing a Database Connection” messages.  Here’s how those look on the backend vs frontend.  If you see this…you have “issues”.

WordPress "Error Establishing a Database Connection" - when viewing the site

WordPress “Error Establishing a Database Connection” – when viewing the site

WordPress "Error Establishing a Database Connection" - when logging into admin.

WordPress “Error Establishing a Database Connection” – when logging into admin.

 

 

How to fix it?

  1. The first “step” is admitting your site has a problem.  That took me a little while.
  2. Step two – the real problem is you are using too many connections from the WordPress code to the database.  It makes it sound like you have a database issue – but in reality…a part of the php code is poorly written.
  3. Its usually a plugin, but can be a theme.  So – disable all the plugins.  Its painful – I know. But trust me when I say – its the easiest was to figure it out.
    Here is the mini menu on the admin screen for plugins.

    Here is the mini menu on the admin screen for plugins.

    The menu WordPress provides for plugins is very good.  There are two things you need to focus on – Active plugins (red box above) and Recently Active (blue box above).  Go to your “Active” plugins and disable them all.  This will put them all into “Recently Active”.

  4. Check the site.  With no plugins…refresh the site 10-20 times.  Is the “Error Establishing a Database Connection” gone?  Don’t forget to get the admin and the homepage.  Also – click around the site a bit.  If you look at 10-20 pages and you don’t see the WordPress issue…you probably have it.Still see it with the plugins disabled? – change themes to a default WordPress version.  Back to rechecking…did that work?If it didn’t – you may have a bigger issue and I would consider looking into a company like https://fixmywp.com – these guys can help if you find your self in a real pickle with no options.
  5. Plugin Problem:
    Now you have to go through the work of turning on plugins.  I usually do 2 at a time, this will cut the time to test down quite a bit.  But you basically do the same thing as in #4 above.  Browse the site and see if the connection issue comes back.  If it doesn’t after 10-20 refreshes…activate more plugins.
    Theme Problem:
    I’m not sure if it is easier or not – but you’ll need to find a new or updated theme.  Themes use the WordPress framework to “get things done”.  I know WP changes things from time to time and it may be your theme was not updated.

If you have SSH access to the server – you can also run this command:

mytop -u {wordpress-database-username} -d {wordpress-database-name} -p '{wordpress-database-password}'

This will give you a list of all the connections to the WordPress database – you want to see 1 or 2 – a list is bad.

That is really what you need to do to figure things out – it can be a single plugin, and combination of two/three plugins or even a bad theme.  This is when you can see the value of paying for plugins and themes.  The premium market has a reputation of putting out better themes and plugins.

Please feel free to contact me if you have questions – I’ll do my best to answer or help when I can.

Do old domains have any advantage from newer sites?

1959 Microwave

1959 Microwave (Photo credit: SportSuburban)

People often times talk about new domains – and how soon will Google index the site…but what about the old websites and its pages and previous rankings, how does that apply to what Google is doing?  What are the algorithm updates doing to those older domains?

If you have not updated your website since before Y2K – you probably have some updates to do to your website.

Matt Cutts talks about Old Domains

The fact is – most older sites tend to put the page creation process on “cruise control” at times.  The same vigor that got you to the top of the rankings in “the old days” with your seasoned, older domain – has much of the same value today…sometimes even more.

“The advice that I can gives you as the owner of the site that has been around for 14 years is to take a fresh look at your site. A lot of time if you land on your site and you land on a random website from the search results, even if they have been in business for 14-15 years, sometime the haven’t updated their template or their page layout or anything in years, and it looks like, frankly, a stale older site, and that sort of thing where users might not be as happy about that.”
Matt Cutts – Google

So basically – fight to stay number one or in the top ten.  Be hungry like these new site people are being.  You have to continue to push out new content, look at social sharing, new ways to do things – essentially you need to have your old domain stay current.  Old domain doesn’t mean you have to do “old” things with it.

If the site you are running is a WordPress site – there are tons of new, fresh themes out there to give you old site a new look.  If you’re not WordPress – many of the other platforms are doing the same.

The How To Guide to WordPress with WooCommerce

Start your engine

Start your engine (Photo credit: pobre.ch)

Well, maybe this should read…how I did it, or better yet – how I plan to.

Firstly, besides by family – I love the web, shopping on the web, wordpress, motorcycles and volkswagens…not necessarily in that order.  I work at a great company called Clickstop (who is a retailer of many goods online – check us out) – but I never like to quit learning.  I came to the company a web developer and have since taken over as the eCommerce Director.  One would think I totally get all things eCommerce and this little journey I have embarked on is crazy…but the thing is – making wholesale changes on sites like ours is not a real good idea.

So, to increase my knowledge – I decided to get a site going which I could continue to pursue my passions (see above) and learn more about my job and the things that go into it.  So, I purchased a defunct ecommerce site called “motorcycle-fairing.com“.  The site was started a few years ago as a drop shipper of motorcycle fairings direct from the factory in China.  Its an interesting business model – and we’ll get more into that as we work on the site and tell the story here on the blog.

Image representing WooThemes as depicted in Cr...

Image by None via CrunchBase

One of my other passions (see above) is wordpress.  So – part of my learning process is also to see what else I can experiment with on wordpress which furthering my ecommerce knowledge.  If you are familiar at all with wordpress, you know it is awesome – but it doesn’t have any ecommerce tools build in.  So, after using WooThemes for quite a while – I chose to leverage their ecommerce plugin called WooCommerce for the site.  WooCommerce is free, as are a number of great themes which are already designed for an online store.

My first challenge will be to get the store up and running, transferring it over from a Ruby on Rails site.  Then there will be a laundry list of things to do after that.

 

Enhanced by Zemanta

5 SEO Tips for Bloggers

5 Spot

5 Spot (Photo credit: Thomas Hawk)

You you just trying to do good writing and not playing the game of all the SEO tricks?  All those silly “tips” that are supposed to skyrocket you to the top ten of Google.

Instead of all that junk – here are five simple and straightforward SEO tips that will help you rank better integrating seamlessly with your writing.

SEO Tips:

  1. One post, one topic, one title. Titles are not only important for your readers but for search engines too, which after all are also readers, although not human. Make sure that the title reflects the topic of the article, and that the article is about a specific topic only. Search engines don’t like confusion and neither do your readers.
  2. Add the metadescription. This one not about ranking but about getting more clicks. If you scroll down your WordPress text editor page (because you are using WordPress, right?), you will likely see a box where you can add a description of the page with a maximum of about 140 characters. This is what searchers will likely see when they find your page in the search engine results, so use it.
  3. Don’t forget the main keywords. We’re not asking you to do keyword research, or maybe we are, but a very quick one. Go to Google and start typing the keyword that best describes the topic you are writing about: the auto-complete function will give you the phrase that people actually use to search that topic on the internet, with probably a couple of variations as well. Incorporate those keywords in the body of the text, just to help search engines understand even better what you are talking about.
  4. Use images and give them titles. You are probably already using images in your posts (and if you’re not, start now), but you should also give them a title using the so called ALT-tag. That’s what search engines use to “read” a picture, so the content of the post will gain more clarity in their eyes. An added bonus is that you might even rank and receive organic traffic from those pictures. Again, WordPress makes it very easy to add the ALT-tag, so there’s nothing technical to learn.
  5. Write guest posts. No blogger’s an island, as the poet used to say (well, sort of), so reaching out to the other people in your niche should be a natural thing to do. You can do it in forums, via email, or commenting on their blogs. The most effective thing you can do however, is to write a post for their blog, with a link to your site. Just one word of caution though: do it for the relationship and the traffic, not for the link.

That was our five quick and painless SEO tips to make your blogging efforts more rewarding.  Good luck.

Enhanced by Zemanta

7 Reasons You Should Design Your Website In WordPress

seoWordPress has quickly become a world-renowned name for those that are looking to make an affordable and dynamic website, but many are still intimidated by creating their own site. It often seems easier to simply go with the first web designer that one finds, but WordPress offers a number of features that allow anyone to carve out their own piece of the internet with an eye-catching, useful, and profitable site. For those that are still unsure about using WordPress, here are seven of the top reasons business owners, private parties, and seasoned web developers may wish to make the change.

1. Complete Freedom with Opensource Code
One of the biggest advantages to using WordPress is the fact that almost all code involved in downloading, creating, and refining one’s website is completely opensource. This means that all users can not only see the code at any time, but change it to fit their own needs and purposes. For those that are taking on web design for the first time, this feature will only be used lightly at first. As one’s knowledge grows, so will their ability to completely customize their website and manipulate the code in any manner that they wish.
2. Advanced Security Plugins
A major concern for those that are creating a business website is the security of their own company, their employees, and their customers. Even a single breach of one’s security could harm a company for months or years on end. While negligent website owners will always have an issue with security, there are a number of free and paid plugins that can protect one’s hard work and can be downloaded directly through the user interface.
3. Simplified Content Management
Over time, every website will begin to gather huge amounts of data including written documents, user information, and media files. With WordPress, these files are organized in an easy-to-use manner with unique links to all new files that are uploaded. Those that are working on the website can even create various categories and sub-folders based off of the keywords, the subject, or unique folders.
4. Affordable Themes
While the experienced web designer can completely develop each page from scratch or use their previous code, thousands of themes are also offered around the internet. These themes come with a wide array of options and users can search out themes according to the website that they would like to create. Some basic themes are free to use while others can be purchased for a single website or the user can buy the all rights to the code.
5. Complete Support
WordPress is continually refined and improved by thousands of developers from around the world. Due to the sheer amount of support, users will be able to find assistance for any problems that they may encounter any time of the day. In addition to an integrated support and help system, there are a number of WordPress-created and third-party forums and support groups for those that have questions about their own website.
6. Control Over Search Engine Optimization
No matter how well-built a website is, it will never be able to keep up with the competition without SEO, or search engine optimization. Website optimization has become a unique and complex industry in and of itself, but WordPress has taken much of the guesswork out of this field. Users can quickly copy and paste bits of code into their website to improve their standing within search engines as well as utilize tools such as Google Analytics.
7.Flexible Server and Hosting Options
WordPress does offer limited hosting options and domain names at absolutely no cost, and this is a great way for private parties to begin the process of creating their own personal website. For businesses that would like a bit more freedom, they have the options to purchase their own domain names and then utilize their own servers or purchased server space.

Featured images:

Kyle Sanders is a WordPress enthusiast and founder of Complete Web Resources, a professional web strategy firm based out of Denver, Colorado. When he’s not writing for the web and designing WordPress plugins, he enjoys the outdoors and craft beers.

Enhanced by Zemanta