WordPress Too Many Redirects

This can be a frustrating error when your WordPress site never resolves – without even a proper error message, the WordPress too many redirects error is an infinite loop that web browsers can’t handle properly.

Not to worry, though! Below we describe a few common solutions to the infinite redirect issue.

Apache / WordPress URL Mismatch:

The most common cause of the WordPress too many redirects is a mismatch between the URL set in your Apache or .htaccess file, and what’s configured in WordPress as your Site URL.

Example:

  1. .htaccess is set to redirect all site traffic to www.yoursite.com
  2. The browser honors the .htaccess redirect, redirects, and it hits WordPress
  3. WordPress in configured with a site url of yoursite.com (without the www)
  4. User is redirected to yoursite.com by WordPress
  5. Back to Step 1 and repeat.

the cycle is now complete, and continues to infinity (and beyond!) An infinite redirect loop at its finest.

The solution here is simple – make sure that your .htaccess and your WordPress site config URLs both match. If they didn’t, this should resolve the issue.

If it didn’t solve your issue, proceed to the Disable All Plugins solution below.

Let me know in the comment section if this worked for you!

Disable All Plugins:

How to Update WordPress Theme – [Easy Instructions]

It may sound complicated, but updating your WordPress theme doesn’t have to be difficult. Below, we’ll show you how it’s done, and get your theme updated before you can say “paint me green, and call me a cucumber!”

As with most things in life, there’s an easy way and a hard way to get’er done:

The Ways to Go About It:

Easy Way:

We’ll try the easy way first, and move over to the hard way if this doesn’t work for you.

First, log into your WordPress admin panel:

http://yoursite.com/wp-admin

Once you’ve logged in, click on Appearance > Themes on the left side menu. This will open the themes panel, with all your installed themes.

Any installed themes that are in need of an update will have a yellow band across the top, indicating ‘New Version Available’ and to ‘Update Now’:

Clicking this ‘Update Now’ link will attempt to automatically update the theme. If successful, your theme is now up to date. Congratulations!

If you run into a Connection Information panel instead, you’ll want to enter your FTP or SFTP connection info and try to proceed with the update.

If WordPress is unable to connect with your (S)FTP info, or you’re using a private key instead of a password, proceed to the Hard Way instructions below.

Hard Way:

So the easy way didn’t work. Don’t sweat it, the hard way is still pretty simple! You’ll just need an FTP editor with a connection to your web server.

First, navigate to the WordPress Theme Market and find the same theme you’d like to update:

https://wordpress.org/themes/

When you’ve found the theme that matches the one your site uses, click Download. This will save a hard copy of the updated theme to your computer.

Next, fire up your FTP editor and connect to your site. Navigate to the site root, then to:

wp-content/themes

You should see a folder on the server that matches the theme. This is the folder with the outdated theme copy that we need to overwrite with the one you downloaded.

On the local side of your FTP editor, navigate to the folder you downloaded the new theme to, and drag it over the old one on the server.

NOTE – Any previous customizations to the theme will be lost when you update it.

If you run into any trouble during the update, you can always follow our instructions to revert to the WordPress Default Theme.

WordPress Redirect to HTTPS

So you’ve installed an SSL certificate on your server, and now you need to configure WordPress to use HTTPS. Don’t sweat! Below, we’ll explain the process step-by-step.

These instructions assume you’re using Apache as your Web Server. If you’re using Nginx instead, follow this guide instead.

Grab a nice cup of coffee or tea, and we’ll jump in. Ready? Okay!

There are two important steps involved to set your WordPress redirect to HTTPS. We’ll have to tell both WordPress and Apache about the change:

Steps to Configure HTTPS:

Configure WordPress:

First, navigate to http://yoursite.com/wp-admin and log into your admin account.

From there, click on Settings > General

In the WordPress Address (URL) field, change the HTTP to HTTPS. You’ll also want to change HTTP to HTTPS in the Site Address (URL) field:

Wordpress Redirect to HTTPS

Saving your changes, WordPress now knows that we want to use HTTPS for the site. In the next section, we’ll cover how to make sure that Apache knows to use HTTPS as well.

Configure Apache:

In This step, we need to make sure that Apache knows to redirect requests made to HTTP, to HTTPS instead.

To do this, you’ll want to edit the file .htaccess in the root directory of your WordPress install. If this file doesn’t exist, create it and then open it.

Some FTP editors have a tough time with editing .htaccess because the name begins with a period – I’ve found that downloading the file, editing, and then uploading works if direct editing does not.

Once you’ve opened your .htaccess, Add the following:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# BEGIN WordPress
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

And save the file. Upload it, if needed. You won’t need to restart the web server, but you may have to do a hard-refresh on the website (ctrl + F5) or a cache clear to see the change take effect.

Congratulations! You’ve successfully configured WordPress to redirect to HTTPS.

Thanks for reading! If you found these instructions helpful, consider commenting below to let us know.

WordPress Development Services

So you’ve got a WordPress site or you’re thinking of launching one. Great!

Now you just need a programmer to provide you with the WordPress development services you need to fix bugs, build new features, and keep your site running smoothly.

Wordpress development services

If you’ve ever tried to find the right developer to hire for your project, however, you know this can be easier said that done. Terms like: Front-end, back-end, PHP, SQL, React, JS, Vue, Python, Java, Ruby, Designer, and Developer all get thrown around and may leave your head spinning.

Then there are hiring platforms, job service boards, Craigslist, Agencies of all sizes, Freelancers, everything. If you’re feeling overwhelmed, read on! We’ll explain some key differences between services, and how to choose the one that fits your needs.

Step 1: Identify Your Needs

Not all WordPress sites are built the same. They can range from a one-page site with a few pieces of info, to a multi-million dollar dynamic eCommerce experience. Knowing which you have will help you identify the right team or developer for you.

Complexity:

Below, we’ve included a scale of website complexity (from ‘less complex’ on top to ‘more complex’ at the bottom) to help you identify where your site or project falls:

Less Complex

  • Single page site, text or a few images
  • Multi-page site
  • Multi-page site, custom theme
  • Multi-page site, custom theme, some dynamic content (maps, videos, animations)
  • Multi-page site, custom theme, lots of dynamic content, custom functionality (something a developer built)
  • eCommerce, or another complex system, lots of dynamic content, animations, tons of custom functionality, lots of concurrent visitors, API integrations (connections to external websites, payment gateways, text messaging systems, CRMs, etc)

More Complex

Once you identify how complex your WordPress site is, you’ll have a better idea whether you should hire a less expensive freelancer, a more expensive freelancer, or a team or agency. The more complex your needs, the more you’ll want to pay for developers who will understand that complexity.

Freelancer vs. Agency:

If a few hours a month of occasional bug fixes is all you need, a freelancer should fit the bill.

If you’re expecting to need 100 hours per week of development time and have the budget for it, you’re looking for a small team.

If 1000 hours a week is more your speed, you need a sizable agency who can support you.

Often, your rough estimate of how much time you’ll need from a developer can help to identify the right match for you quickly.

Urgency:

You’ll find a great deal more developers who can solve your problem “sometime this week” than those who can address it today.

That said, some developers offer a rush service fee for times when you absolutely need something done right away.

Others are so booked up into the future that you’ll be scheduling appointments like a doctor’s office.

Another thing to consider is that your developer or team is going to be much more likely to fix things promptly for their best customers first. Spending a lot of money at the same place is often a good route to preferential treatment, as is always paying your bills on time.

Always make sure to include your timeline when explaining your project to developers, and expect to pay more if you’re in a hurry.

One-Stop Shop vs. Specialty:

Something to consider is whether you want to manage your project, hiring, and coordinating yourself, or if you want things handled for you.

With any project, the option to stand in as your own manager is always available as a way to defray costs. Understand, however, that you’re likely not going to be anywhere near as good at it as someone with experience. Still, there are advantages.

If you’ve already got one piece of a team for your project, such as a graphic designer or UI/UX designer, you might want to coordinate between them and the developer / team you hire.

If you’ve already got a server guy who manages your hosting, then feel free to coordinate between them and the team you hire.

If, on the other hand, you’re starting from scratch – you may want a team that can handle design, UI/UX, front-end development, back-end, and server stuff while coordinating it all.

Decide how dirty you’d like to get your hands, and then hire appropriately.

I size my teams based on your project needs. Reach out at http://danhennion.com/contact for my current availability.

WordPress Default Theme

In this guide, we’ll show you how to set your WordPress site back to the default theme.

This is often required when debugging, or when encountering an issue with a new theme. Read on to find out how it’s done.

If you have Admin Panel Access:

As long as you’re able to access your admin panel at:

http://www.YOUR-SITE-HERE.com/wp-admin

you’re off to a great start. With admin panel access you can easily switch to the default theme. Start by logging into your account, and then click on the ‘Appearance’ tab on the left side menu.

The Themes panel will open, and show thumbnails for each theme you have installed. Here, you can simply hover over any theme and click the ‘activate’ button, such as the default theme.

Wordpress default theme

Congratulations! You’ve now successfully learned how to change your theme.

If you do not have Admin Panel Access:

If you’re unable to access your admin panel, fear not! There’s still a way for you to switch to the default theme with no admin access.

To do so, simply open your wp-content folder, and rename the theme folder inside to anything else, such as themes_inactive.

Renaming the themes folder will stop WordPress from finding the applied theme – when it can’t find the intended theme, it will revert back to the default theme automatically.

If a broken theme was the reason you didn’t have admin panel access, that should now be restored. Let me know in the comments below if your issue was resolved!

If you’re not sure if you have Admin Panel Access:

If you’re unsure whether you have admin panel access or not, try going to the following URL:

http://www.YOUR-SITE-HERE.com/wp-admin

Update the ‘YOUR-SITE-HERE’ part with your site URL. If you see a WordPress login page, you’re on the right track. If your credentials are saved and you’re able to log in, congratulations! You have admin panel access. Click here for next steps.

WordPress Disable Plugin

Want to learn how to disable one or more plugins in WordPress? You’ve come to the right place!

Sit back and relax as we dive into how you can disable WordPress plugins.

Disabling One Plugin:

To disable a plugin in WordPress, navigate to your admin panel at:

http://www.[yoursite].com/wp-admin

If you’re unable to access your admin panel, click here

Log in with your admin account, and then click on the ‘Plugins’ link on the left side menu. This leads you to a page that lists all your installed plugins, both active and inactive.

disable plugin

Circled above in strawberry is the link to activate a plugin which is current inactive. In blueberry, the link to deactivate a plugin which is currently active. Use these links to disable the plugin you need disabled.

A notice will appear at the top indicating that the plugin has been disabled successfully.

Disabling All Plugins:

If you’d like to disable all the plugins in WordPress, navigate to your admin panel at:

http://www.[yoursite].com/wp-admin

If you’re unable to access your admin panel, click here

Use your admin credentials to log in and click the ‘Plugins’ link on the left side menu. The ‘Plugins’ link goes to a listing of all your installed plugins.

disable plugin wordpress

Circled above is the checkbox which will select or deselect all the other checkboxes. One click will select every plugin and allow you to apply a bulk action.

After selecting all plugins, apply the bulk action ‘Deactivate’ from the bulk action dropdown and click ‘Apply’.

wordpress disable plugin

Disabling All Plugins Without Admin Panel Access:

It’s all fun and games when you have access to your admin panel – turning plugins on and off is as easy as flipping a switch. What happens if you don’t have access to your admin panel, however?

WordPress users might find themselves with a broken admin panel for a number of reasons, such as the common 500 internal server error. If this is the case, you can disable one or all plugins directly from your MySQL database without using the WordPress admin.

To do this, open your site database via your web panel, your favorite database editor, or the terminal. Identify the database your WordPress install uses, and then the options table – often prepended with ‘wp_’ as wp_options. Update the following SQL to match your table name, and run it:

SELECT `option_value` FROM `wp_options` WHERE `options_name` = 'active_plugins';

This will spit out a string that tells WordPress which plugins are currently active. Save this, as you’ll need it later.

Next, you’ll want to clear out the ‘active_plugins’ value in the database:

UPDATE `wp_options` SET `option_value` = '' WHERE `options_name` = 'active_plugins';

Clearing that out will result in disabling all plugins. Congratulations!

If one was causing you to lose access to the site or admin panel, your access should now be restored. Remember if you’d like to set the plugins back exactly as they were you can use the value you saved earlier with this query:

UPDATE `wp_options` SET `option_value` = 'YOUR-STRING-SAVED-FROM-EARLIER-GOES-HERE' WHERE `options_name` = 'active_plugins';

Swapping in the string saved from earlier. This will enable any plugins that were previously enabled, while leaving any disabled that were previously disabled.

How to Back Up WordPress

The Easy Way (Automated Backup)

The simplest way to back up your WordPress site, including the database, media files, plugins and theme is using the All-in-One WP Migration plugin by ServMask.

All-in-One WP Migration makes it super easy to export everything all at once, without the need for a manual FTP transfer or database export. Keep reading to learn how to use it for your backup.

First, you’ll need to install the All-in-One WP Migration tool via your Plugins panel or through FTP, and activate the plugin.

NOTE – If you’re unable to access your admin panel or install plugins, jump to the manual backup method

If you notice any errors during activation, such as:

All in One WP Migration is not able to create wp-content/plugins/all-in-one-wp-migration/storage folder. You will need to create this folder and grant it read/write/execute permissions (0777) for the All in One WP Migration plugin to function properly.

then you’ll need to apply the permissions mentioned (0777) to the appropriate folder. Run this to apply the right permissions:

mkdir wp-content/plugins/all-in-one-wp-migration/storage
chmod -R 777 wp-content/plugins/all-in-one-wp-migration/storage
mkdir wp-content/ai1wm-backups
chmod -R 777 wp-content/ai1wm-backups

That should resolve any permission errors.

Click the ‘All-in-One WP Migration’ link in the side menu of your WordPress admin panel:

How to Back Up WordPress

Click the green ‘Export To’ button and the click ‘File’ (or any other format you’d prefer). A window will pop up (it may take a little while!) that lets you download the file:

Download WordPress Site Backup

Click the green ‘Download’ button, and you’ve successfully backed up your WordPress site!

The Hard Way (Manual Backup)

If you’re unable to access your admin panel, your site isn’t working, or you just want to do things the old fashioned way and avoid messing around with backup plugins, this is your guide.

The backup process is two-part: Files and Database.

Files:

To back up the site files, you’ll want to connect to your site via FTP or SFTP. Navigate to the site root – often found in /var/www or /var/www/html. From there, you want to download all the files into a local folder labeled with the date.

Be patient, as the download may take a while depending on how complex your site is.

Database:

Many database tools offer the ability to export the database. There are too many to cover here, so we’ll focus on the primary web tool that shared hosting panels off: phpMyAdmin

cPanel

If your webhost runs cPanel as your hosting panel, log into cPanel and look for the ‘Databases’ section. There will be a link to phpMyAdmin there:

phpmyadmin in cpanel

Plesk

If your webhost runs Plesk as your hosting panel, log into Plesk, open the control panel, and click on Websites and Domains > Databases. From there you can access individual databases, such as your WordPress database, which will open in phpMyAdmin.

Once you’ve got phpMyAdmin open, you can select the site and database on the left:

phpmyadmin database screenshot

In the screenshot above, I’ve selected the ‘course’ database within ‘mysite’

Once you’ve got the right database open, the ‘Export’ button in the top right will bring up the panel where you can export all your important data:

phpmyadmin exporting as sql

Quick method, SQL format, and then Go! You’re all set, your database will be exported and download automatically. Keep this in a safe place.

500 Internal Server Error WordPress

500 internal server error wordpress

One of the most common (and most annoying) errors that PHP throws is the dreaded ‘500 internal server error’. WordPress is just as susceptible to this as any other PHP framework, but rest assured we’ve got the solution for you.  Keep reading!

NOTE – Before continuing, it’s important that you always back up your site before making any changes.

the 500 internal server error WordPress is a general error that can be caused by any one of numerous problems. Below, we’ll dig into common causes and their solutions to get your site running again now:

Enable Debugging

The most direct approach we can take is to enable debugging mode, and hope that WordPress is able to give us a more-specific error after that.

To do this, open up wp-config.php in the root folder of your WordPress install. Search for the following line:

define( "WP_DEBUG", true);

If this line is present, make sure the value is set to true. If you’re unable to locate this line, add it to the end of your wp-config.php on a new line and save.

Test again and see if the 500 error has disappeared or changed to a different error message. With any luck, you’ll have a new message pinpointing exactly what file / line the issue is on. Give this info to your developer if you’re unsure how to correct the issue.

If this fix didn’t solve your issue, proceed to the next solution below.

See if the Admin Panel Works:

For this test, visit http://yoursite.com/wp-admin and see if the page loads and you can log in.

If the admin panel does loads for you, we can conclude the issue is probably a plugin or your theme issue.

If the admin panel does not load for you, we’ll have to do some further debugging.

Plugin or Theme Issue

If the admin panel did load for you, we can be pretty sure that the issue is with a plugin or your theme. If you’ve just made any changes to either, try reverting back to how things were and see if this helps. Undo any code changes, deactivate any plugins you recently enabled, and if you just applied a theme, revert to the old one.

If you haven’t made any changes recently, try disabling all plugins or switching to the default theme. By switching themes and turning plugins on and off, you’ll often be able to deduce which plugin or theme is causing the issue.

Further Debugging

What if the admin panel didn’t load for you either? Here’s where we’ll delve deeper into possible fixes when neither the front-end nor the admin panel will load.

The best place to get find a readout of the exact error you’re experiencing is in the PHP error log. Since WP Debugging didn’t catch the error, we’re expecting that programming language interpreter did.

First, locate your PHP error log. It depends on your operating and web server, but common locations include:

  • /var/log/apache2/error.log
  • /usr/local/apache/logs/error_log
  • /var/log/httpd/error_log

Scroll to the bottom of the error log, looking for the most recent dates and times (they’ll be all the way at the bottom). Search for ‘fatal error’ and identify whether you’ve received any of those recently. You can even refresh the website, reload the log, and see if a new fatal error is appended to the log.

Fatal Errors are an indication that something is broken – if you’re seeing them, you’ll need to address the issue to get your site working again. Luckily, the file and line number will be indicated so you know exactly where the issue is. If you’re unable to resolve it yourself, give your web developer the error message and they’ll take care of it.

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 Word Press – and for good reason.

Just look at the numerous benefits 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.
  • Multilingual – Easily translate your WordPress site into any language
  • Free!

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

Speed:

Wordpress is really fast

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 WP 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 WP tasks than it may be for less-standard, more complex platforms and frameworks.

Multilingual:

At the time of writing this, WP has been translated into 203 languages. Many major plugins also have translations, so keep an eye out for plugins which support the language you need.

Free:

WordPress is free software! While some themes and plugins are paid, there are numerous free ones to choose from. WordPress.com even offers free hosting for WP sites (albeit it in extremely limited form). For my clients I generally opt for a reliable paid web host where I can deploy a free copy of Word Press and have full control.

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!