So this question is probably a result of me not completely understanding the inner workings of Wordpress - especially the home variable.

So here is what I did, and after that I will ask my question.

I did set up a Wordpress on localhost (with a remote database). Then I set up a fileserver for everything (except my .php files) and added it via the cdn-enabler. Now I uploaded my Webiste to AWS and exposed it to the world via an API-gateway, while still using the old database. The website does work well now, even if I shut down my localhost server.

Since my hyperlinks still point to localhost (eg. /about_me would point to localhost/wordpress/about_me), I changed the home in wp-config to "myurl/stage". Now if an go to "myurl/stage/about_me" I will see the about_me page just fine, but as soon as I go to "myurl/stage/index.php" I will get a timeout.

The error persists, either if I only set home, or if I set home and siteurl. If I only change the siteurl the cdn-enabler will stop working, but I can access "myurl/stage/index.php", also all my hyperlinks will point to index.php, e.g: "myurl/stage/index.php/about_me".

Does anyone have a idea what happened here? Can you give me a better insight in how exactly home and siteurl behave?

ps.: Maybe its important to note, that if I set home to "myurl" instead of "myurl/stage" I can access "myurl/stage/index.php". Sadly, if I do this all hyperlinks are broken again. Example: "myurl/about_me"

1 Answer 1


I fixed it. This behaviour was due to a redirect loop from "home" to "home".

Adding the following line to wp-setting.php dit it for me. Sadly this is only a workaround. Maybe someone can hint me to a better fix. remove_action('template_redirect', 'redirect_canonical');

Your Answer

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

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