Should I Use WordPress?

Let’s face it, WordPress powers the internet. Recent estimates of the percent of sites running on WP have exceeded 30%. No other platform has the reach or market share of WordPress – and for good reason.

Just look at the numerous reasons highlighted in this quick overview:

  • Fast, with Rapid Dev for simpler websites
  • Highly extensible, with more plugins and themes than any other platform
  • Supported – There are numerous programmers and agencies who offer WordPress development services.

Below, we delve deeper into the specifics of each of WordPress’ killer advantages.

Speed:

WordPress is lightning-fast, and has a ton of optimization plugins available. These include SEO optimization plugins such as Yoast, and caching like W3 Total Cache.

Because of the wide array of themes and plugins, websites can often be built in hours rather than days.

Extensibility:

I said it before and I’ll say it again – the number of themes and plugins available in WordPress is extreme. Someone has come up with a way to do most things, packaged it up, and put it on the plugin marketplace. If your exact situation isn’t addressed in a plugin, it’s often possible to find something similar and have your developer modify it rather than start from scratch.

Support:

WordPress powers the internet, so developers support WordPress. It’s very common that your web developer will have at least some WordPress experience. It can also be easier to find and hire a new developer for WordPress tasks than it may be for less-standard, more complex platforms and frameworks.

More Coming Soon!

WordPress – The Editor Has Encountered an Unexpected Error [Solved]

Gutenberg editor error

A pesky error that WordPress users have become somewhat accustomed to seeing is the ‘Editor Has Encountered an Unexpected Error’ thrown when attempting to use the newer Gutenberg visual editor to create or edit posts and pages. This can be a real pain, as it completely prevents you from editing anything!

Common solutions found online often include disabling plugins to see which ones might conflict, and switching to different themes.

Others suggest you install Classic Editor, a plugin that enables the ability to use the old editor we all know and love. This can be extremely useful, especially if you aren’t exactly the biggest fan of Gutenberg. We know there’s a lot of controversy over the new block editor, and it’s not exactly everyone’s cup of tea.

What if you’d actually like to get Gutenberg working again, though? What if the new editor, and having everything broken into easy-to-use blocks, is exactly how you’d like to write your posts?

If, like me, neither of these solutions work for you and you happen to be on Nginx rather than Apache, you might be able to resolve the ‘editor has encountered an unexpected error WordPress’ with the following config change:

Check your Nginx config (often located in /etc/nginx/sites-available) and look for the following line:

location / {
        try_files $uri $uri/ /index.php?$is_args$args;
}

For me, removing the ‘?’ question mark between /index.php and $is_args was the solution. Check that your line matches this:

try_files $uri $uri/ /index.php$is_args$args;

Then, save the config file, reload nginx:
sudo service nginx reload

Try editing/creating the post or article again, and see if Gutenberg works now.

Did this fix resolve your issue? Let me know in the comment section!

WordPress Clear Cache [Step-by-Step Guide]

If you’re looking for instructions on how to clear your WordPress cache, you’ve come to the right place.

Rather than built-in caching, WordPress relies on various plugin options. This lets developers build different and competing solutions which is great, but it means that we have a few different ways to clear the cache depending on which option your site is using.

Check out the cache plugin index for solutions to clearing each caching plugin, or jump right in below:

 

Hint* – If you’re not sure which caching plugin your site uses, check your ‘Plugins’ page in the admin panel, and look for any of the plugins on the list (above) that might be active.

If your site is using w3 Total Cache, navigate to Performance > Dashboard in the admin panel and click the ’empty all caches’ button:

w3 cache clear

 

If your site is using WP Super Cache, navigate to Settings > WP Super Cache and click the ‘Delete Cache’ button to clear it:

If you’re using WPEngine, it comes with a built-in caching solution. Click on the WP Engine menu, navigate to General and click the ‘Purge All Caches’ button:

WPEngine Cache Clear screen

If you’re using Securi for caching, go to Performance > Clear Cache – Global, and then hit the green Clear Cache button:

Securi cache clear screen

Http Error Uploading Image – WordPress

Http error uploading image wordpress

Are you seeing the ‘Http error uploading image’ or ‘Unable to create directory wp-content/uploads/[current year]/[current month]. Is its parent directory writable by the server?’ message in WordPress?
These are both very common errors, especially on new installs. Luckily, the fix is a breeze – so stay tuned to learn how to get that image uploaded successfully.

Solution #1: Check the Directory Permissions

You can set the permissions necessary for WordPress by running the following commands in the root directory of your WP install:

sudo find . -type f -exec chmod 664 {} +
sudo find . -type d -exec chmod 775 {} +
sudo chmod 660 wp-config.php

This will ensure that your folders have the right permissions, which is required for image uploading to work correctly. Once you apply the permissions, test and see if you’re able to upload the image as intended. If you’re interested in learning more about filesystem permissions and why WordPress uses these in particular, Benjamin Intal has a great article with extensive info here.

Proceed to the next step if your issue is not resolved.

Solution #2: Raise the WordPress Memory Limit

If you’ve confirmed that your directory permissions are correct from the first solution, the next thing to try is raising the memory limit in WordPress to allow for larger files to be uploaded. WordPress may be running out of memory on the upload and throwing the error for that reason. To check, open your wp-config.php in the root directory of your WordPress site, and search for ‘WP_MEMORY_LIMIT’. If you don’t find it, add the following line:

define( 'WP_MEMORY_LIMIT', '256M' );

If that line was already present, try raising it to something higher. The ‘M’ stands for Megabytes, and it’s extremely unlikely that any image you’re trying to upload ever exceed 256 megabytes, so this is a great limit to raise it to. If you’re uploading videos rather than images, however, note that you may need to raise this limit even higher.

Save the wp-config.php and retry your upload. Check if your http error uploading image WordPress is resolved.

Hopefully the new expanded memory limit solved your problem. If it did, let me know about it in the comments! If not, proceed to Solution #3 for the next fix.

Solution #3: Change the Image Library

PHP has two different options for image processing library – Imagick or GD Library. Either library will generally work fine and play nice with WordPress, but on some hosts Imagick may run into memory issues. In this fix, we set GD Library as the default to see if there’s a problem with Imagick on your web host.

Open your theme’s functions.php file located in wp-content/[your_theme_here]/functions.php and add the following snippet to the end:


function image_editor_default_gd( $editors ) {
    $gd_editor = 'WP_Image_Editor_GD';
    $editors = array_diff( $editors, array( $gd_editor ) );
    array_unshift( $editors, $gd_editor );
    return $editors;
}
add_filter( 'wp_image_editors', 'image_editor_default_gd' );

Save your changes and try uploading the image again. With any luck, GD Library did the trick! Let us know in the comments if this worked for your http error uploading image WordPress.

Error Establishing a Database Connection – WordPress

error establishing database connection wordpress

We’ll unravel the mystery of the dreaded ‘error establishing a database connection’ WordPress issue once and for all, and get your site and database playing well together.     

Read on for the solution!

 

Are you seeing this error establishing a database connection in WordPress? This is one of the most common errors that comes up in WordPress, and it can be frustrating when it just won’t connect to your database no matter what you try. Fear not!

Fix #1: Check wp-config.php and confirm you have the right credentials

open up the file wp-config.php in the root directory of your website. This file contains the credentials that WordPress uses to connect to the database. Specifically, we’ll look at these 4 lines:

define( 'DB_NAME', 'database_name_here' );
define( 'DB_USER', 'username_here' );
define( 'DB_PASSWORD', 'password_here' );
define( 'DB_HOST', 'localhost' );

Double-check these 4 lines and make sure that they match your database credentials exactly. Check for spaces and capitalization. Often, switching the DB_HOST from 'localhost' to '127.0.0.1', or vice versa from '127.0.0.1' to 'localhost' is enough to solve the issue, so try flipping the DB_HOST after you’ve checked the first three credentials.

Error establishing a database connection wordpress

*Hint – if you’re unsure where to find your database credentials, consult with your web developer or web host.

 

Fix #2: Repair the WordPress Database

No success with the first fix? No problem! Sometimes the WordPress database can become corrupt, so the next thing we’ll try is a database repair. WordPress has an automated tool for DB repairing which makes this fix a cinch to apply.

First, you’ll need to allow database repairs through your wp_config.php file. Open wp_config.php and add a new line at the very end of the file as follows:

define('WP_ALLOW_REPAIR', true);

Save the file and then point your browser to [your_site_url]/wp-admin/maint/repair.php

Wordpress Database Repair Screen

This launches the database repair tool, where you’ll see the option to ‘Repair the Database’. This may take some time, so be patient once you click to repair. Hopefully after the repair, your WordPress error establishing a database connection will be resolved. Test to see, and move onto the next fix if you’re still having issues.