Category: Wordpress

Wordpress Developer in San Diego

How Do I Fix Too Many Redirects Error WordPress with Godaddy

Recently, After Dark Grafx moved a website that was developed on our staging servers over to GoDaddy’s Managed WordPress Hosting– (yes, clicking the link is an affiliate referral). I couldn’t find “one” solution that worked for me, so I had to do some research and narrowed it down to the following.

My client’s website initially worked fine after the move to Godaddy. We moved the database and the files over and redirected and updated all urls for the site. My client then contacted Godaddy and had them install a Digital Security Certificate for the website. They should have consulted with us first before making the site secure. The website then went offline shortly after the SSL install. Godaddy does state “your website may go offline from 24-72 hours while the SSL is being installed and approved” by their system. This is not always the case. Sometimes it is faster or slower depending on the certificate. If your website is still offline after 3 days, you should contact Godaddy via phone to check it the SSL was installed correctly.

So, once the SSL was installed, we encountered the, “Too Many Redirects” warning. Godaddy stated they could fix this issue for a small fee.  Really?  You break my website, then you tell me you can fix it for a fee? No thank you.

Check to see if your website is secure here:  https://www.whynopadlock.com/  (not an affiliate link – just a great free tool to check your website security) the website was still not viewable or working on any device or browser on multiple operating systems.

I began by performing the following tasks:

BACKUP THE WEBSITE AND DATABASE: You should first log in to your control panel and back up your entire website, database, files, etc. Contact your current host for help with this before you start the process below. You have been warned!


CHECK THE WORDPRESS SITE URLS:
If you CAN access your WordPress Admin, you should check to make sure that the URLS are EXACTLY the SAME under the site settings located on the left of your admin.
SETTINGS —> GENERAL

If you CAN NOT access the WordPress Admin but you have FTP access to the website, you can download and edit the wp-config.php file. Be sure to make a backup of the wp-config.php file in case you make a mistake. If you make a mistake, you may take your website offline.Simply add the following code above the  /* That’s all, stop editing…. */   text within this file.

define(‘WP_HOME’,’https://www.YOUR-DOMAIN-HERE.com’);
define(‘WP_SITEURL’,’https://www.YOUR-DOMAIN-HERE.com’);

/* That’s all, stop editing! Happy publishing. */
Save the file and re-upload it to your server.

Go to your website and refresh the page that was not working. Be sure to add this variable ?junk=1 after your website url link like this (  Example: https://www.YOUR-WEBSITE-HERE.com/index.php?junk=1 ) since WordPress Managed Hosting on Godaddy uses Varnish Caching (meaning, it is server-side caching to speed up the website so refreshing the browser cache without the variable added above to end of the url does nothing so you will still see the old page and errors. Once you add this variable, it will show you the newest page.
You don’t have to make it ?junk=1  you can call it whatever you like  ?mytexthere=1
).

If you have a contact page and the url is https://www.YOUR-WEBSITE-HERE.com/contact-us/   then the url would be https://www.YOUR-WEBSITE-HERE.com/contact-us/?junk=1

If site still doesn’t load, add this to the top of the wp-config.php file.

define(‘FORCE_SSL_ADMIN’, true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER[‘HTTP_X_FORWARDED_PROTO’], ‘https’) !== false)
$_SERVER[‘HTTPS’]=’on’;

This will force the WordPress site to use SSL for all of its’ connections. So be sure that you are using https not http for all of your website urls.

If this doesn’t work, proceed to “CHECK WORDPRESS PLUGINS” below.


CHECK THE PLUGINS:
I logged in via FTP and changed the name of the plugins folder located in the WordPress installation typically here wp-content/plugins to plugins_back. This will not destroy your website, just rename it back to plugins when you are finished testing. I then refreshed and cleared my browser history and tested the site again. Site still did not work.Sometimes there are plugin conflicts or the plugin itself is to blame. If your site loads and the error is gone after renaming the plugins folder, then you know it is a bad plugin that caused the issue. You would then rename the plugins_back folder back to plugins and then rename each of the plugin folders to selectively disable them. I typically just put a “z” in front of the folder name. Do this for ALL of the plugin folders within the plugins directory. Then, rename the first plugin folder by removing the “z” so it is now the original name of the plugin folder.

Example:  plugin folder is named    contant-contact-plugin  I would rename this to zcontant-contact-plugin then test to see if the site loads.Go to your website and refresh the page that was not working and don’t forget to add this variable ?junk=1 after your website url link like this (  Example: https://YOUR-WEBSITE-HERE.com/index.php?junk=1 ) since WordPress Managed Hosting on Godaddy uses Varnish Caching (meaning, it is server-side caching to speed up the website so refreshing the browser cache without the variable added above does nothing so you will still see the old page and errors.You don’t have to make it ?junk=1  you can call it whatever you like  ?mytexthere=1 ).

You would then go back to your FTP program and rename the next plugin. And repeat the steps above, except when you get to the website url, change it to ?junk=2  – You have to change the number after the equals sign each time you want to refresh the latest changes that you made, so that the Varnish Cache refreshes and shows you the newest page / code so you can see if it fixed the issue or not.

If you you have 10 plugins and you get to #5 and the website starts to work correctly, then you know it is one of the plugins – so you should do the same steps above for each of the plugins that you need to use for your site in the plugins folder to determine which plugin was causing the conflict.


CHANGE URLS IN DATABASE: 
In some cases, you may have to double check that all of the urls are pointing correctly and using the correct url.  If you moved your site from https://www.MY-DEVELOPMENT-SERVER-URL.com and now it is on https://www.YOUR-WEBSITE-NAME.com then you have to make sure that all references to images, code, etc. are updated in the database and any custom edited files in php.

If you are able to login to  PHPMYADMIN: (see this tutorial)

Press on SQL section in phpMyAdmin and enter the following code:

UPDATE wp_options SET option_value = replace(option_value, 'oldurl.com', 'newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';UPDATE wp_posts SET guid = replace(guid, 'oldurl.com','newurl.com');UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com');

This code will replace all instances of oldurl.com to newurl.com. For example if your current WordPress address is oldurl.com, it will be changed to newurl.com. Also note, that some developers change the PREFIX for the wp_options and wp_posts – so be sure that you are using the same tables in this SQL request. Example:  if they called it  rs_options and  rs_posts  instead, you would change these in this SQL request.

IMPORTANT! Do not forget to replace oldurl.com with your current WordPress address and newurl.com with your new WordPress address.

IMPORTANT! Download the original SQL WordPress Database before you begin making any changes. Simply select the database name on the left of the screen then select EXPORT —> GO  and make sure SAVE TO FILE is selected on your screen. Some hosting companies have this set by default. Sometimes you will have to click on the ADVANCED link on the export page to see all of the options.

CHECK THE CODE:  If your site was created by a developer, ask them to edit the custom pages of your website that may have direct, absolute links to images or links (http://www.YOUR-SITE-HERE.com/wp-content/uploads/01/YOUR-IMAGE.jpg). Notice that this url is NOT secure using https. Have them fix all of the references to http or just tell them to make the site secure for you.

If you do not have a developer and are still experiencing issues, you can also contact After Dark Grafx.

Some developers are lazy and will place a direct image reference like this in your header.php, footer.php or other page or pages of your website to make it work for their development.After performing all of these tests, and then adding the directives, the site should work correctly.

.HTACCESS: In some cases, you will need to make changes to your .htaccess file. This is the file that controls what your website will do in terms of forwards, redirects, denying access, etc. Some plugins add data to this file that can ultimately conflict with your website. We are not going to cover this file as it is “host-specific” and needs to be analyzed before making any adjustments.

If you are still experiencing issues, you can also contact After Dark Grafx. Toll Free: (888) 578-8300.

RockStar Martial Arts - Website Design by After Dark Grafx

RockStarMartialArtsFranchise.com – WordPress Design Development

After Dark Grafx announces the launch of  RockStarMartialArtsFranchise.com !  We appreciate you choosing After Dark Grafx to design and develop your new website.

Rock Star Martial Arts is located in Frisco, Texas.

Rock Star Martial Arts Franchise - WordPress Developer San Diego After Dark Grafx

James Boecker has trained in Martial Arts for over 30 years. He has been in the business for over 25 years and built and ran the largest Martial Arts organization in Texas, then selling the organization in 2013. He continues his passion of martial arts through continuous training and has helped 100s of other school owners reach their fullest potentials

Shiva Boecker started her Martial Arts training in 1998. She managed the corporate and largest location of James’ organization for 7 years. James and Shiva opened RockStar in 2014 after noticing the need for luxury martial arts centers.

They offer:
– An Award Winning Anti-Bullying Program™
– Unique Interactive Virtual Training System – RockStar University™
– Small Studio Sizes  and more.

Visit them today at:  http://www.rockstarmartialartsfranchise.com

Erin and Kelly Sell Sonoma IDX Wordpress Website Design

ErinAndKellySellSomoma.com IDX WordPress Real Estate Web Design

Congratulations to http://www.erinandkellysellsonoma.com for allowing After Dark Grafx to design and develop your new website with IDX real estate MLS integration for your WordPress Website.

We know there are a lot of Real Estate Website Design Companies out there to choose from, so we appreciate you having the confidence in After Dark Grafx for your online brand development.

A little bit about ErinAndKellySellSonoma.com

Erin Davis and Kelly Stober have been real estate business partners in Sonoma for 29 years. The partnership of Erin and Kelly was successful from the beginning, and together, the team is one of the most recognized real estate partnerships in the area.

Their extensive experience and knowledge has enabled the team to give guidance to many of the questions potential buyers and sellers have about the market. They are consistently ranked among the top agents in the company and have accomplished this by being involved in almost every aspect of real estate sales in the Sonoma area — from condominiums and single family homes to vineyard and country properties, business opportunities, commercial restaurants, and minor subdivision development sales.

Visit http://www.erinandkellysellsonoma.com today and tell them James, from After Dark Grafx sent you!

Website Design Wordpress Developer After Dark Grafx Ingredient Hub

Ingredient-Hub.com Website Design

Welcome, Ingredient-hub.com to the After Dark Grafx Family!

Ingredient-hub.com, Desirée Nelson, is a Consultant, Broker, Tea Expert Your Trusted Tea & Botanical Sourcing Partner

INGREDIENT HUB, Build a Blend – International Tea Importers

Visit them today and tell them After Dark Grafx sent you!

“I like working with James and his team, that is why I have had them do two websites for me. The insight, recommendations and basic ‘no-bs’ answers to my questions has helped me to focus and be successful! Thank you” – D

Wordpress Design Development by After Dark Grafx - DesertStretchDoc Dr Jenni Martin

RanchoMurietaStretchDoc.com WordPress Website Design

Welcome ranchomurietastretchDoc.com to the After Dark Grafx family. We had the pleasure of designing and developing this new WordPress Chiropractic Website for Dr. Jenni Martin, Rancho Murieta.

Dr. Jenni Martin, A chiropractic orthopedist for over 30 years, uses ART(Active Release Technique). FST(Fascial Stretching Therapy), and COX (Flexion stretching table) to treat the active, mature adult. She finds the combination of fascial muscle therapy, specialized COX lower back technique, and selective exercises and stretches, create the best and fastest positive results.

  • Board Certified Chiropractic Orthopedist
  • LPGA Class A Teaching Professional
  • Full Body Certified ART (Active Release Technique)
  • Advanced Trained FST (Fascial Stretching Therapy)
  • Treating Patients for over 30 years
  • Specializes in Stretching Techniques to reduce lower back pain, should pain relief and neck pain relief from golfing and equestrians.

Currently Servicing: Rancho Murieta, Folsom and Eldorado Hills

Visit: ranchomurietastretchDoc.com Click Here

Search Engine Optimization San Diego

Use PHP in Widgets Without a Plugin WordPress

There are times when you are working on your WordPress website and you might want to execute some php in a widget or sidebar. You can download plugins to do this but this adds bloat to your WordPress. Remember, using the least amount of plugins in your website will ensure that the site loads quickly, has limited conflicts with other plugins and is easy and quick to upgrade.

I always recommend that you do not edit your main themes’ functions.php file, rather, place a new functions.php file in a child-theme folder instead.  This way any updates to WordPress will not break your code.

wp-content/themes/your-theme-here/functions.php  (don’t touch this)

Create a new folder here:

wp-content/themes/your-theme-here-child/

  • notice I added -child  to the end of the new folder

so now you should have

wp-content/themes/your-theme-here/functions.php
wp-content/themes/your-theme-here-child/

Create a NEW functions.php file (use a text editor or notepad) and place it in this folder so it looks like this…

wp-content/themes/your-theme-here-child/functions.php

add this little bit of code to your theme’s function.php file:

// Enable PHP in widgets
add_filter('widget_text','execute_php',100);
function execute_php($html){
     if(strpos($html,"<"."?php")!==false){
          ob_start();
          eval("?".">".$html);
          $html=ob_get_contents();
          ob_end_clean();
     }
     return $html;
}

Next…

Open your WordPress Admin –> APPEARANCE —>  WIDGETS  and add whatever  php code you want to the Widget. Select a TEXT WIDGET and drag it to the SIDEBAR Widget then add your shortcode

or whatever shortcode you have.

**Hint: Remember to us <?php my code here ?> within the widget not just the code itself.

Save it. Then go to your public facing page and you should see the code working!

FIN!

Of course, before making any changes, you should make a full backup of your website. If you don’t want to make a backup from your hosts control panel, you can add a plugin like UpDraft to WordPress to do this for you.

Of course, if you don’t want to do this, you can always hire us!

by James Byrne, Information Architect – After Dark Grafx

Wordpress Developer in San Diego

Use Shortcodes in Widgets Without a Plugin for WordPress

Have ever wanted to use a Shortcode in a widget area of WordPress but didn’t want to add another plugin or contact a developer?

By default, WordPress doesn’t support this feature.

You can simply add this short snippet to your theme’s function.php file and you’ll be using shortcodes in widgets in no time at all!

I always recommend that you do not edit your main themes’ functions.php file, rather, place a new functions.php file in a child-theme folder instead.  This way any updates to WordPress will not break your code.

wp-content/themes/your-theme-here/functions.php  (don’t touch this)

Create a new folder here:

wp-content/themes/your-theme-here-child/

  • notice I added -child  to the end of the new folder

so now you should have

wp-content/themes/your-theme-here/functions.php
wp-content/themes/your-theme-here-child/

Create a NEW functions.php file (use a text editor or notepad) and place it in this folder so it looks like this…

wp-content/themes/your-theme-here-child/functions.php

add this to the functions.php file

<?php 
// Enable shortcodes in widgets
add_filter( 'widget_text', 'shortcode_unautop' );
add_filter('widget_text', 'do_shortcode');
?>

Next…

Open your WordPress Admin –> APPEARANCE —>  WIDGETS  and add whatever Shortcode you want to the Widget. Select a TEXT WIDGET and drag it to the SIDEBAR Widget then add your shortcode

or whatever shortcode you have.

Save it. Then go to your public facing page and you should see the shortcode working!

FIN!

Of course, before making any changes, you should make a full backup of your website. If you don’t want to make a backup from your hosts control panel, you can add a plugin like UpDraft to WordPress to do this for you.

by James Byrne, Information Architect – After Dark Grafx