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.

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

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

4 Ways To Live Blog On WordPress

WordPress

WordPress (Photo credit: Adriano Gasparri)

Picture this scenario: You are at the hottest conference or event of the year. While most of your readers aren’t able to attend themselves, they have all backed you as their representative of all things cool. You are there on their behalf, ready to gush over every little detail. All you want to do is blog as much about this event as you possibly can, but you aren’t looking forward to hauling your little notebook everywhere you go to transcribe notes.

Luckily, there is a much more effective and techno-friendly version of this process. It is called live blogging, and it is a must for any blogger who is attending a conference, meeting, lecture or other event. Just to keep those reading up to date on what is going on right now.

Live blogging is by far the best-working technique to get known in your niche and build better relationships with industry leaders!

Make it easier to keep up with these four tools for live blogging on WordPress.

1. Live Blogging

This plugin creates a stripped-down, simpler version of the usual WP post screen. From there you can create micro-blogs that let you update quickly and continuously throughout the event. It also auto-updates all reader’s screens so they get up to date information at all times. This all integrates flawlessly into your blog for later viewing.

2. Liveblog

Here, we have an even more basic plugin. It works by creating a single dialogue box where you update. You type in your micro-post, publish and that’s it. It will keep the updates rolling as they auto-refresh. It is very easy to use and install, and just gives you the most basic features.

3. Twitter LiveBlog

Sync your WordPress and Twitter for micro-blogging on both sites. This is a very good plugin, as it allows you to have social media integration along with your published content. Each post appears as its own line with a time stamp, for easier following by readers.

4. WP Live Stream

This widget follows the same format as Twitter to make it look like the social media site. But everything is central to your blog, so all content remains there and only there. It provides URL shortening, archive and clear features, live updates, email streaming and more.

Do you know of any good tools for live blogging on WordPress? Let us know in the comments.

Featured images:
  •  License: Image author owned
  •  License: Image author owned
  •  License: Image author owned
  •  License: Image author owned

Michelle is the blogger and editor behind Viral Mom, the free guide for mom building business from home.

The 4 Best WordPress Projects To Outsource

WordPress

WordPress (Photo credit: Adriano Gasparri)

Big thanks to WordPress for being the #1 most used and most popular content management system on the web today. Why? Because of two reasons, 1) it’s built in PHP which is by far the most extensible and customizable of all coding languages and 2) it has created a web environment that is recognized by more programmers and designers than any other environment on the web today.

What does this mean exactly? It means you can outsource with effectiveness. Outsourcing can be dangerous, costly, and unproductive. But not when it comes to WordPress. This stable and practical web environment has allowed people to add features to their websites like never before. Here are the 4 best WordPress projects to outsource and get the most out of your investment:

1. Theme Improvements

This would be any UI or functionality you need added to your theme that doesn’t justify the development of a stand-alone WordPress plugin. In this scenario you would package up the files of your theme and send them on to a contractor with specific instructions for what new functionality you need added. Be as specific as you can be with descriptions and screenshots if necessary.

2. Social API Connections

Connecting to popular social sites via APIs and creating unique functionality on your site can be very very difficult. It’s also one of the biggest opportunities available for creating a better user experience and expanding your online business. The right outsourced contractors will be perfect for helping these connections happen for you. Think Facebook Connect for a minute and you’ll get what I’m referring to here.

3. Plugin Innovations

There is nearly a WordPress plugin for everything you can think of. But don’t let that stop you here. Here’s why, because nearly 90% of all plugins either a) don’t work entirely as promised or b) haven’t been updated to be compatible with the most recent version of WordPress. Add this to the fact that you’re always going to want your own “bells and whistles” it’s always a good idea to outsource your WP plugin development.

4. Mobile Capabilities

And finally, mobile. Mobile is tricky to say it kindly. You’ve gotta optimize your website for mobile phones, tablets, different types and models of phones and tablets etc. There’s a ton of work to be done here, and it makes perfect sense to leverage an outsource contractor. Also, don’t forget mobile app development which will require a contractor with a whole different skill-set but will be extremely valuable to you nonetheless.

Unless you’re a coder yourself, you need the help of a programmer to help you create new functionality for your site or blog. Outsourcing is a great idea for many reasons but primarily it has to do with cost. It’s cheaper than hiring someone locally. And because of how universal WordPress has become, you have more options than ever in hand-picking a developer to help you get the job done.

Enhanced by Zemanta