I am trying to run a local version of a live Wordpress site, however, after setting up the local environment and attempting to access:


I receive the following error:

This webpage has a redirect loop
The webpage at http://localhost/wordpress/ has resulted in too many redirects.
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.

Whilst I cannot visit the site, I am able to access the dashboard for the site locally at:


I have been trying to fix this for many hours, and have had another wordpress expert (who already runs a local version of the same site) spend 2 hours hashing through this with me. No luck. I would appreciate any help. As hopefully useful background:

To run the local version I installed MAMP, and both the MySQL and Apache server are green. I have placed a copy of all the site files in MAMP/htdocs/wordpress. I have exported the site database as an .sql file, created a new database in the phpmyadmin page loaded through MAMP, and imported the .sql file.

I have also updated the config.php file to have the following details:

define('DB_NAME', 'database_name');

/** MySQL database username */
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', 'root');

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

I have also changed all the wordpress urls to run off localhost:80/wordpress through a SQL find and replace statement.

My .htaccess file contains the following:

# BEGIN WordPress

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.+)$ /index.php/$1 [NC,L,QSA]

# END WordPress

All of this setup yields the error when trying to view

If anyone requires any further information or any of the above is not clear, I will be happy to provide. Thanks in advance for any help.

  • 2
    In your site's Settings >> General, what are the values for WordPress Address (URL) and Site Address (URL)? Also, try renaming .htaccess to htaccess.broken or something similar. Does that fix the problem?
    – Pat J
    Oct 7, 2013 at 14:31
  • What are the current permissions on your .htaccess file?
    – iyrin
    Oct 8, 2014 at 4:46
  • Hi, Have you tried without htaccess, (i mean disable .htacess). Using with the Wordpress default URL. Also you have multi-language site? Thanks
    – Vee
    Jul 8, 2015 at 6:52

4 Answers 4


I for instance have MAMP pro running with custom development URLs like project.dev. When I created the one-click installation of Wordpress through MAMP, it automaticly entered the port-number into Wordpress as well. I don't think Wordpress likes when the port-number is :80 which is standard. Removing the port-number from Wordpress Address and Site Address did the trick in my case.


As I was moving from Windows environment to Mac OS probably on the copy files i was missing the install.php file. And when i tried to install the theme it would bring me the redirect loop screen.

It was confusing to me because I was following all steps at the end I went to look for the install.php and saw it was missing there put it in the place and voila!

Maybe will help i don't know, for the next readers to come!


In your web browser, try deleting cookies for your local domain — in this case "localhost"

  • 3
    Please add an explanation to your answer: why could that solve the problem?
    – fuxia
    Mar 10, 2014 at 4:14

I had the same problem, and my solution was to disable the language plugin (in my case polylang), and to reenable it. It's logic that it automatically changes some links that are not declared in the database. (my guess). Anyway it worked! :D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.