Archive

Finding The best WordPress Theme for business

Untitled

“Beauty awakens the soul to act.” This resplendent phrase of Dante’ couldn’t be truer than in case of designs. Today’s internet is no longer the drab and achromatic world it was a decade ago. The internet has transformed into a vivid and colourful virtual cosmos. Especially when it comes to websites, the look and feel of the website clearly exert a strong influence on your visitors. Poor design and interface evokes mistrust and are one of the major reasons of a mistrust in a website. Leaving your website dull and boring is doing a huge disservice to your business. Choosing a wrong theme for your website can mean lower traffic, less visits and lower ranks in search engines.

A website is the digital portrayal of an organization and leave a perennial impression in the minds of your visitors. As an extension of your business, your website should reflect your business personality. Now that you have enough reasons to go for a revamp, you may think that the battle is almost won although you would soon realize that deciding to go for a revamp is the easiest part of the process. It is selecting a perfect theme that would dictate the future of your website. Even though WordPress comes with a huge selection of both free and paid themes, choosing a theme can be an overwhelming decision as you wouldn’t want your website to look like the run-of-the-mill type. Picking the right theme involves much more than just going with the latest flow, following the hippest trends or choosing the most aesthetic looking theme. Read on the tips below to see how you can pick the best WordPress theme for your website.

Define Your Needs

The first step before you can even start theme browsing is to understand what your needs are. The perfect theme would depend a lot on your business goals, the kind of business you are in, the kind of themes your competitors are using and the kind of themes your users would like? Don’t get distracted by the pretty themes and latest fads and choose a theme fitting your business instead of making your business fit to the theme.

Pick a Theme relating to Your Industry

It is understandable to want to stand out of the crowd but if a certain industry goes with a certain kind of themes, there are always reasons to theme. If you have an event planning or photography business, it is always better to stick to image-based website even if you may have the best wordsmiths in your team. Stick to a theme relating to your industry, niche, services or products.

Check for Versatility

A theme which is frozen and wouldn’t scale up with your business is not a good choice. Also opt for a theme which is responsive and serves your needs well now and in future.

Strive for simplicity

It is very easy to get carried away and choose complex themes with a lot going on. But some themes may have speed and redundant code structure issues. Go for simple and elegant themes for a timeless look.

Pick the Plugins

Ensure that whatever theme use are compatible with the kind of plugins you would need for your website.

Compatibility Issues

This is one of the most important factor when theme shopping. Ensure that the theme you are choosing is compatible with most famous browsers. Themes which are be w3 valid and cross browser compatible are a good choice.

Apart from the above pointers look for security (very important), speed (another very important factor), responsiveness, SEO friendliness before finalizing on the WordPress theme.

After you have narrowed down on a WordPress theme, the next step would be choose a hosting provider for your website. If you are on a look out for hosting services, ShineServers has got your covered. The Hosting Services offered by ShineServers are affordable, reliable and secure.

How to Change WordPress Themes Directly From the Database

Sometimes it becomes necessary to manually change your theme directly from the database instead of via the WordPress admin. This is actually what we use when upgrading our admin demos since it’s much faster using the command prompt or phpMyAdmin.

Prerequisites

  1. Comfortable with either phpMyAdmin or command prompt to run SQL statements
  2. Some understanding of WordPress option values

Getting Started

There are three option_name rows in the database that need to be changed. These are what control which theme is currently active on your website.

  • template – the “Theme Name” as defined in style.css
  • stylesheet – the actual name of your theme folder
  • current_theme -the actual name of your theme folder

Step 1

First let’s do a quick check and see what theme you currently have set. Note, this SQL assumes you have your tables named with the standard wp_ prefix. If that is not the case, you’ll need to changewp_options to whatever prefix your table structure uses.

SELECT *
FROM wp_options
WHERE option_name = 'template'
OR option_name = 'stylesheet'
OR option_name = 'current_theme';

After running the SQL from within phpMyAdmin, you should see something like this:

wordpress-change-theme-database

Results after selecting the three option rows.

Step 2

Now it’s time to change the theme. Figure out which one you’d like to switch to and change the threeoption_values = ''  below. You’ll notice that the first option is capitalized which is important.

Once you’ve got your SQL code you’ll run it to change your current theme. (this example assumes you have ClassiPress already in /wp-content/themes/classipress/.

UPDATE wp_options SET option_value = 'ClassiPress' WHERE option_name = 'template';
UPDATE wp_options SET option_value = 'classipress' WHERE option_name = 'stylesheet';
UPDATE wp_options SET option_value = 'classipress' WHERE option_name = 'current_theme';

After running that SQL from within phpMyAdmin, you should see a success message similar to this:

wordpress-change-theme-database-done

If your SQL statements were correctly run, you’ll see a message like this:

Step 3

Go back to your website and refresh. You should now see the new theme running.

Having Trouble?

If you get an error 500 page or a different error, it’s likely you didn’t use the correct values for the theme. Go back and make sure they are correct.

One common error occurs when you’ve got the same theme but with different folder names (i.e. classipress-31 and classipress-312). In this situation the “Theme Name” in style.css is the exact same so your “template” option_name should be “ClassiPress/classipress-312″ instead of just “ClassiPress”.

If it’s still showing the old theme, clear your cache (if you use a caching plugin like WP Super Cache) and that should resolve it.

Get Out of Jail Free Card

If you’re in a bind and can’t get anything to work, just run this SQL from phpMyAdmin. It will reset your website to use the default Twenty Eleven theme (change your wp_ prefix if necessary).

UPDATE wp_options SET option_value = 'Twenty Eleven' WHERE option_name = 'template';
UPDATE wp_options SET option_value = 'twentyeleven' WHERE option_name = 'stylesheet';
UPDATE wp_options SET option_value = 'twentyeleven' WHERE option_name = 'current_theme';

How to Fix the Error Establishing a Database Connection in WordPress

How to Fix the Error Establishing a Database Connection in WordPress

If you have been surfing the web for a while, you have at least seen this error a few times. Error Establishing a Database Connection is one of those curses that could be caused by many reasons. As a WordPress beginner, this could be awfully frustrating specially when it happened on its own without you changing anything. We ran into this issue yesterday on our own site. It took a little over 20 minutes to detect and fix the problem. While doing the research to find possible causes, we realized that there was no good article that covered everything. In this article, we will show you how to fix the error establishing a database connection in WordPress by compiling a list of solutions all in one place.

Note: Before you make any database changes, make sure you have sufficient backups.

Why do you get this error?

Well in short, you are getting this error because WordPress is unable to establish a database connection. Now the reason why WordPress is unable to establish a database connection can vary. It could be that your database login credentials are wrong or have been changed. It could be that your database server is unresponsive. It could be that your database has been corrupted. In our experience, majority of the times this error happens because of some sort of server error however there could be other factors as well. Lets take a look at how to go about troubleshooting this problem.

Does the problem occur for /wp-admin/ as well?

First thing you should do is to make sure that you are getting the same error on both the front-end of the site, and the back-end of the site (wp-admin). If the error message is the same on both pages “Error establishing a database connection”, then proceed onto the next step. If you are getting a different error on the wp-admin for instance something like “One or more database tables are unavailable. The database may need to be repaired”, then you need to repair your database.

You can do this by adding the following line in your wp-config.php file:

1 define('WP_ALLOW_REPAIR', true);

Once you have done that, you can see the settings by visiting this page:http://www.yoursite.com/wp-admin/maint/repair.php

WordPress Database Repair

Remember, the user does not need to be logged in to access this functionality when this define is set. This is because its main intent is to repair a corrupted database, Users can often not login when the database is corrupt. So once you are done repairing and optimizing your database, make sure to remove this from your wp-config.php.

If this repair did not fix the problem, or you are having trouble running the repair then continue reading this article as you might find another solution to work.

Checking the WP-Config file

WP-Config.php is probably the single most important file in your entire WordPress installation. This is where you specify the details for WordPress to connect your database. If you changed your root password, or the database user password, then you will need to change this file as well. First thing you should always check is if everything in your wp-config.php file is the same.

1 define('DB_NAME''database-name');
2 define('DB_USER''database-username');
3 define('DB_PASSWORD''database-password');
4 define('DB_HOST''localhost');

Remember your DB_Host value might not always be localhost. Depending on the host, it will be different. For popular hosts like HostGator, BlueHost, Site5, it is localhost.

Some folks suggested that they fixed their problem by replacing localhost with the IP. It is common to see this sort of issue when running WordPress on a local server environment. For example on MAMP, the DB_Host value when changed to the IP may seem to work.

1 define('DB_HOST''127.0.0.1:8889');

IP’s will vary for online web hosting services.

If everything in this file is correct (make sure you check for typos), then it is fair to say that there is something wrong on the server end.

Check your Web Host (MySQL Server)

Often you will notice this Error establishing database connection when your site gets swarmed with a lot of traffic. Basically, your host server just cannot handle the load (specially when you are on shared hosting). Your site will get really slow and for some users even output the error. So the best thing you should do is get on the phone or livechat with your hosting provider and ask them if your MySQL server is responsive.

For those users who want to test if MySQL server is running yourself, you can do a few things. Test other sites on the same server to see if they are having the issue. If they are also getting the same error, then most definitely there is something wrong with your MySQL server. If you do not have any other site on this same hosting account simply go to your cPanel and try to access phpMyAdmin and connect the database. If you can connect, then we need to verify if your database user has sufficient permission. Create a new file called testconnection.php and paste the following code in it:

1 <?php
2 $link = mysql_connect('localhost''root''password');
3 if (!$link) {
4 die('Could not connect: ' . mysql_error());
5 }
6 echo 'Connected successfully';
7 mysql_close($link);
8 ?>

Make sure to replace the username and password. If the connected successfully, then it means that your user has sufficient permission, and there is something else that is wrong. Go back to your wp-config file to make sure that everything there is correct (re-scan for typos).

If you cannot connect to the database by going to phpMyAdmin, then you know it is something with your server. It does not necessarily means that your MySQL server is down. It could mean that your user does not have sufficient permission.

In our case, our MySQL server was running. All other sites on the servers were working fine except for WPBeginner. When we tried going to our phpMyAdmin, we ended up getting the error:

#1045 – Access denied for user ‘foo’@’%’ (using password: YES)

We got on the phone with HostGator and their support quickly found the problem. Somehow our user’s permissions were reset. Not sure how that happened, but apparently that was the reason. They went back in and restore the permissions and we were able to get the site back live.

So if you get the access denied error in either connecting to your phpMyAdmin or through testconnection.php results, then you should contact your host right away to get them to fix it.

Solutions that Worked for Others

It is important to note, that these may not work for you. Use at your own risk and make sure that you have sufficient backups if anything goes wrong.

Here it is said that his client was getting the error that database needs to be repaired. Even after repairing the database, the error did not go away. He tried various things and at the end, the issue was the site url. Apparently that was changed which caused the error to persist. He ran the SQL query by going to phpMyAdmin:

1 UPDATE wp_options SET option_value='YOUR_SITE_URL' WHERE option_name='siteurl'

Make sure to replace YOUR_SITE_URL with the actual url example: http://www.wpbeginner.com. The wp_options will be different if you have changed the default WordPress database prefix.

This seemed to fix the issue for him and few others that commented on his post as well.

Sachinum suggested that he was able to connect the database with testconnection.php, so he changed the wp-config.php user to the root user. WordPress started to work perfectly fine. Then he reverted the settings back to the database-user, and it continued to work. He could not figure out what was wrong, but concluded that it was a typo.

Cutewonders suggested that they removed the content of active_plugins in wp_options table and edited the contents of recently_edited. Basically that seemed to fix the problem. Please their full response here.

We read on numerous sources that users simply uploaded a fresh copy of WordPress and it fixed the error.

This is a really frustrating error. What have you tried that seemed to work for you?

We would be happy to expand on this resource, so others do not have to waste as much time finding a solution.

How To Fix WordPress Memory Exhausted Error – Increase PHP Memory

Fix: WordPress Memory Exhausted Error – Increase PHP Memory

We have transferred numerous client websites, and sometimes a WordPress Memory Exhausted error shows up when activating a new plugin or doing some other task. Usually the error looks like this:

1 Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home4/xxx/public_html/wp-includes/plugin.php on line xxx

We got an email from a user who was facing the same problem, so we decided to do a writeup on it because this is a common problem. The reason why this error shows up is because you exceed your default Memory Limit. There are numerous solutions for it, but in this article we will share the simplest one out of all.

First open your wp-config.php which is located in the root WordPress directory. Then add the following line inside the main php tag:

1 define('WP_MEMORY_LIMIT''64M');

We just increased the memory limit to 64M. If you still get the error after this fix, then please contact your host. Most likely, they would have to go in their php.ini file to increase the memory limit for you. If you have other ways of increasing the memory limit, then let us know in the comments below.

How to Deactivate All Plugins When Not Able to Access WP-Admin

How to Deactivate All Plugins When Not Able to Access WP-Admin

Often times during troubleshooting, many sites will recommend deactivate all plugins and activate them one by one. What’s worst is sometimes you get locked out of your WordPress admin panel, so you can’t even deactivate the plugins in an easy way. If you have ever faced the white screen of death, then you know exactly what we are talking about. In this article, we will show you how to deactivate all WordPress plugins when not able to access wp-admin area.

There are two methods to disabling your plugins. One requires you to use FTP, and the other requires you to use phpMyAdmin.

Deactivate All Plugins Using FTP

In this method, you will need to either use FTP, or your host’s file manager. Navigate to the /wp-content/ folder. You will see a folder called plugins. Rename the plugins folder to anything that you like. In our example, we will call it “plugins.deactivate”. Once you do this, all of your plugins will be deactivated.

Most of the time when you do this, you are usually locked out of your admin panel. If the issue was with your plugins, you should be able login to your /wp-admin/. Once you do that, go back to your /wp-content/ directory and rename “plugins.deactivate” back to plugins. Now you can activate one plugin at a time until your site breaks again. At which point, you will know exactly which plugin caused the issue.

Deactivate all plugins using phpMyAdmin

The FTP method is definitely easier in our opinion, however you can also deactivate all plugins using phpMyAdmin. If you don’t know how to get to phpMyAdmin, then we recommend using the FTP method above.

In your WordPress database, go in the wp_options table. Locate the option name “active_plugins”. Now edit the value of that option and change it to this: a:0:{}

We hope that this article helps you deactivate all plugins in a fairly easy way.

How to Make Phone Numbers Clickable for Smartphones in WordPress

How to Add Clickable Phone Numbers for Smartphones in WordPress

The number of users browsing websites from their phones is increasing every day. A lot of businesses put their phone numbers on their website, but it is not clickable. Recently, one of our readers who was working on a local restaurant site asked us if there was a way to convert phone numbers into clickable links for mobile users. This would allow the mobile users to tap and call the restaurant right from the website. In this article, we will show you how to add clickable phone numbers for smartphones in WordPress.

If a phone number is written in a recognizable phone number format, then most smart phones would automatically recognize the telephone number and convert it into a link. However, if you want the number to be replaced by an anchor text, or you want to link an image to a phone number, then you would want to manually create the link.

The proper format to write a telephone number is:

<Country Code> <(Area Code) > <Local Number >

Example: +1 (555) 555-1212

However, most smart phones would also recognize these formats:

  • +15555551212
  • +1.555.555.1212
  • 555-555-1212
  • 555 555 1212

Tapping on a properly formatted phone number opens dialer in smart phones

Writing phone numbers in proper format will automatically convert them into links for mobile phone users. However, users with older phones may not see the link.

<!--This link will work on Android and iPhone. It will be visible to desktop users but will result in an error when clicked -->
<a href="tel://+15555551212">+1 (555) 555-1212</a>
<a href="tel://15555551212">Call Me</a>

The problem with the above link is that it will be visible to users on all devices. If someone on the desktop click on it, then it will do nothing on Google Chrome and will show an error in Firefox.

<!-- This link will open Skype on desktop and notebooks, on mobile phones it will ask users if they would like to open skype or dial this number using their phone -->
<a href="callto://15555551212">+1 (555) 555-1212</a>

In the example above we have used callto: protocol. This protocol is used by Skype along with skype: protocol. Using this has an advantage that smartphone users will be able to call the number using their phone service, while users on desktops and other devices will be able to make a call using Skype.

<!-- Link a number to an image -->
<a href="callto://15555551212" title="Call Me"><imgsrc="/images/call-me.png" alt="Call Me" /></a>

The above example links an image to a number using Skype’s callto: protocol. The problem with this syntax is that a smartphone may recongnize the Skype protocol, but it may not recognize the phone number. Furthermore, it may not offer the user a chance to call using their phone.

You can also create links to Skype usernames and provide live chat support, or voice call support to your visitors.

<a href="skype:echo123">Skype</a>

We hope that this article helped you add clickable phone numbers for smartphones in WordPress. Do you use the tap to call feature when using mobile browsing? Let us know by leaving a comment below.

How to Optimize Your WordPress Blog Posts

WordPress SEO Tip for Beginners – How to Optimize Your WordPress Blog Posts

Often we notice that beginners install and activate the SEO plugins, but they never use it properly. We asked some of our users about it, and their response was “I didn’t know that I was suppose to be doing this”. Yes, we are talking about SEO meta data such as title and meta description. By using SEO functions properly for each post, you can definitely improve your search rankings. There is a lot you can do to optimize your blog posts, so they can perform better in search results. In this WordPress SEO tip for beginners, we will show you how to properly use SEO functions in WordPress posts.

At WPBeginner, we use WordPress SEO plugin by Yoast to optimize our blog posts. Therefore, all screenshots will reflect that.

WordPress SEO snippet preview

Choosing a Focus Keyword

A focus keyword is the main keyword that you are hoping people will look for and find your post. If your blog is in a competitive niche then chances are that you will be competing with many other established and reputable publications for popular keywords. In such situation, you can get more organic traffic by using long tail keywords. Always remember that your audience is humans not search engines. People don’t just type one keyword in search engines, they use phrases. Your focus keyword can be a phrase.

WordPress SEO by Yoast allows you to choose a focus keyword for your individual posts. It also helps you find similar keywords as you type your focus keyword.

WordPress SEO Keyword Suggestions for Focus Keyword

Once you have chosen a focus keyword for your post, WordPress SEO will show you how many times you have used the keyword in different areas of your post.

Focus Keyword Count in WordPress SEO plugin

Writing a Good SEO-Friendly Post Title

Post SEO Title

A good SEO friendly post title is human readable, contains your focus keyword and is within the 70 characters limit. However, it also needs to be catchy. When your page appears in the search results, a user will decide whether or not they want to click on it based on the SEO title and the description in the search snippet. The description part may change as search engines display the most relevant part of your article as the description. But the title will remain the same. Make sure your SEO title describes exactly what people will get if they clicked on the link. And finally, simplify your title, rather than using “A Comparison between Categories and Tags From SEO point of view” or “My thoughts on Categories and Tags” try something like “Categories vs. Tags – SEO Best Practices for Sorting your Content”. This title is not only catchy, it also contains the right keywords that people would be searching for.

Post SEO Meta Description

Some SEO experts believe that Meta description tag on a page has become irrelevant. However, many others would disagree. At WPBeginner, we recommend using meta description for all of your posts. A good meta description can explain a lot more about an article. Meta Description is also shown in social media sites like Facebook, Google+, and in Twitter via Twitter Cards.

Since now you know that people are going to be reading your meta descriptions, you want to make sure that it is helpful. You also want to make sure that you at least mention your focus keyword in the meta description for search purposes. The character limit for Meta Description is 155 characters. Try to stay within that limit or your meta description will be truncated after 155 characters. Try to use your focus keyword earlier in the meta description rather than later.

Categories and Tags

Sorting Your Content

Categories and tags help you sort your content not only for your reader, but for yourself as well as search engines. Earlier we have written a detailed guide on how to use Categories and Tags in WordPress. Think of your website as a book. Categories are the table of content, and tags are the index part of the book.

Make Internal Linking a Habit

Once you have blogged for a while, you will have enough content that you would want people to read. With internal linking you can send new readers to check out your older relevant posts. Internal linking is a great way to develop context between your new and old posts thus passing relevant link juice. WordPress allows you to search for your old posts right inside the post editor. Press the link button in your post editor and click on “Or link to existing content”. This will open a search box. Search for older posts that you want to link to and it will show the results as you type. Select the post you want to link and press Add link button.

WordPress Internal Link Search

Each post you publish on your website has the potential to increase your search engine traffic. By adding meta data to your posts, writing good headlines, and cross linking between your older articles, you will soon start noticing an increase in your search traffic. We hope that you found this WordPress SEO tip for beginners helpful.

Let us know, what you are doing to optimize your WordPress blog posts ?

GZIP Enable WordPress Plugin

Speed Up Your WordPress with GZIP Comppression.

This plugin will compress your wordpress site, with this plugin you can speed up access to visitors to your website.

This plugin uses GZIP compression method. so any requests from browsers that support gzip, the server will compress the web with a very small size, so the web you will feel lighter when accessed.

GZip is a software application used for file compression, Compression is a simple, effective way to save bandwidth and speed up web sites, gzip is short for GNU zip; as the program was created a free software replacement for the compress program used in early Unix systems, intended for use by the GNU Project.

This plugin needs mod_gzip and mod_deflate on your server.

This plugin has been received at the wordpress.org plugin page, you can access information about this plugin at http://wordpress.org/extend/plugins/gzip-enable/.

Click here to download this plugin.