Solving the Grid WordPress SSL redirect loop

Browse by products and services

  • Applies to: Grid
    • Difficulty: Easy
    • Time Needed: 5 minutes
    • Tools Required: File Manager, FTP, or SSH access


On occasion, adding an SSL to a WordPress site on the Grid will cause the site to appear to perform an endless redirect to a "different" site. (This might look like the dreaded WordPress Redirect Exploit, but it is not.) The usual symptom of this is an error message stating that the site is caught in an infinite redirect loop.


There are two different methods to solve this issue quickly and relatively painlessly:

Method 1: Using File Manager or FTP

  1. Use either your preferred FTP/SFTP client or the File Manager tool to browse to the document root of your WordPress website. This is the folder that will show as the front page of your WordPress installation when viewed in a web browser.
  2. Replace the contents of index.php with the following text:
    define('WP_USE_THEMES', true);

Method Two: Using SSH

  1. Launch your Terminal (Mac or Linux) or PuTTY (Windows) program.
  2. Connect via SSH to your Grid, replacing the example text (in blue) with your server credentials:
  3. Once connected to your server, execute the following command:
    find /home/00000/domains/domain_name/html/ -type f -exec sed -i 's/HTTP_HOST/SERVER_NAME/g' {} \;
  4. Once this has executed and the prompt re-appears, type:

Either of these methods should take care of the redirect issue. If you're still experiencing problems related to an infinite redirect loop after installing an SSL certificate, then it's entirely possible that there may be additional complications in your WordPress setup that would fall outside of the scope of (mt) Media Temple's support. An errant plug-in, incorrect setting in the "home" field of the wp_options table, or botched rewrite rule can sometimes cause similar issues.