WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks don't work - they give 404 errors (6 posts)

  1. arsencoffee
    Member
    Posted 3 years ago #

    Greetings,
    I just moved my blog to a new server, and it turns out that now all the permalinks don't work. It gives a 404 file not found error message.
    I've tried to replace the .htaccess file with a fresh one, but nothing happened.

    The blog is here: http://journal.akb48.org

    Thanks!

  2. James
    Happiness Engineer
    Posted 3 years ago #

    Can you confirm that mod_rewrite is enabled on your server?

  3. arsencoffee
    Member
    Posted 3 years ago #

    Thank you for the response! My server uses nginx instead of apache, and enabling nginx' equivalent of mod_rewrite (http_rewrite_module) solved the permalinks problem.

    The problem now is that it can't load the theme and I can't log in to the wordpress dashboard.

    The code I added to enable http_rewrite_module is

    if (!-e $request_filename){
            rewrite ^(.*)$ /index.php?q=$1 last;
            break;
            }
  4. Ramandeep Singh
    Member
    Posted 3 years ago #

    Simply USE a redirect plugin for get rid of 404 error.
    All you have to do is installing a redirect plugin and put your old permalinks structure. Then all your links automatically redirect to new permalink structure without 404 error.

  5. arsencoffee
    Member
    Posted 3 years ago #

    Unfortunately, now I completely can't log in to the wordpress dashboard. Even after removing the previous http_rewrite_module code, the site give me Error 404 - Not Found when I tried to log in.

    Help please?

  6. arsencoffee
    Member
    Posted 3 years ago #

    By the way, the wp-login.php works fine. wp-admin is the one that gives 404 error

Topic Closed

This topic has been closed to new replies.

About this Topic