Support » Fixing WordPress » Permalinks broken after update

  • Resolved molj


    Hello good people!

    I have WP 3.7.1 running on a nginx debian server.
    somewhere in between updating to WP 3.6-3.7 my permalinks got broken(wish I could remember what was the turning point, I suspect it was the theme update).

    I’ve also updated my Responsive theme

    I tried deactivating plugins, setting the permalinks to default, deleting .htaccess file and uploading a fresh one and then putting the permalinks back to /%postname%/. WP wrote the file:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # BEGIN WordPress
    # END WordPress

    Permalinks still give out 404 error, with plugins off or on it doesn’t matter.

    I tried adding add_filter( ‘got_rewrite’, ‘__return_true’, 999 ); to my functions.php with no gain.

    I’m not a very experienced admin so I don’t know how to troubleshoot this, debug.log (activated in wp-config.php) gave me no clue.

    My site is (currently the default permalinks are activated).

    I’ve been surfing about this issues the past 2 weeks and haven’t found the solution yet, would be really grateful if someone could help.

    Have a nice day and thank you!


Viewing 6 replies - 1 through 6 (of 6 total)
  • Have you tried going to Permalinks and just saving them again?

    Also, check you database – it may need to be repaired.



    Hey lorax, yes i’ve tried that several times. Havent checked the database. Will try to repair it like the guys suggest it here. Although today i reinstalled wp and the database got checked by wp and it returned no errors.



    I’v optimized and repaired the wp database with no luck. The repair script repair.php tells me that all tables are OK.

    Also tried to rewrite the .htaccess file, again with no effect.

    Any other suggestions?




    I found something in my error logs:

    2013/11/17 18:38:36 [error] 3199#0: *18296 “/var/www/” is not found (2: No such file or directory), client:, server:, request: “GET /komercialno/ HTTP/1.1”, host: “”, referrer: “”

    Where does this orient me? Towards the rewrite mod? Location?



    Forum Moderator

    By default, WordPress does not use .html urls, so this may have nothing to do with your current problem. Have you checked that mod_rewrite is running on the server?



    esmi: mod_rewrite is running

    Found the solution!
    Although I have no idea why this thing broke, because it was running fine for almost a year now.

    The error log gave me a clue, that somehow nginx doesn’t find the index files and I found the solution here:

    The default nginx configuration /etc/nginx/nginx.conf indicates that another configuration is included:
    include /etc/nginx/sites-enabled/*;
    So I checked in that folder and found the file to which i added the following snippet into the server section:

    location / {
    	try_files $uri $uri/ /index.php?$args;

    So my main problem was I was trying to push this code to the default nginx.conf file instead to the site configuration (or maybe i was just doing it wrong:)

    Consider this topic solved and thanks for the cooperation!


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Permalinks broken after update’ is closed to new replies.