Support » Fixing WordPress » permalinks work on localhost, don't work in production

  • Resolved jgmasot

    (@jgmasot)


    Hi!
    I have wordpress running fine in my local machine. When I migrate to production, using the plugin “duplicator”, everything seems to work fine. In fact, I can access my dashboard successfully and navigate inside wordpress with no problems.

    However, when I try to “visit site” or navigate to the proper site directly I get the error “This webpage has a redirect loop”.

    The error is solved by adding the following line to my functions.php file
    remove_filter('template_redirect', 'redirect_canonical');

    After adding this line, the site becomes available, however the permalinks do not work and any link would lead me to the home page instead. If I change the permalink settings to default
    (http://www.mydomain.com/?p=123) then everything works fine.

    Any help would be really very much appreciated.

Viewing 1 replies (of 1 total)
  • Thread Starter jgmasot

    (@jgmasot)

    Hi again
    Just in case this is helpful to someone:

    The problem was in my web hosting service. I raised the issue with them and they solved it for me.

    Then, I didn’t require the remove_filter clause and every thing works fine. Also the permalinks.

Viewing 1 replies (of 1 total)
  • The topic ‘permalinks work on localhost, don't work in production’ is closed to new replies.