WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Permalinks broken after update (7 posts)

  1. molj
    Member
    Posted 9 months ago #

    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]
    </IfModule>
    # 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 ponnod.com (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!

    Matej

  2. Gregg Banse
    Member
    Posted 9 months ago #

    Have you tried going to Permalinks and just saving them again?

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

  3. molj
    Member
    Posted 9 months ago #

    Hey lorax, yes i've tried that several times. Havent checked the database. Will try to repair it http://wordpress.org/support/topic/repair-database?replies=5 like the guys suggest it here. Although today i reinstalled wp and the database got checked by wp and it returned no errors.

  4. molj
    Member
    Posted 9 months ago #

    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?

  5. molj
    Member
    Posted 9 months ago #

    Hello,

    I found something in my error logs:
    /var/log/ispconfig/httpd/ponnod.com/error.log;

    2013/11/17 18:38:36 [error] 3199#0: *18296 "/var/www/ponnod.com/web/komercialno/index.html" is not found (2: No such file or directory), client: 192.168.1.1, server: ponnod.com, request: "GET /komercialno/ HTTP/1.1", host: "www.ponnod.com", referrer: "http://www.ponnod.com/"

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

  6. esmi
    Forum Moderator
    Posted 9 months ago #

    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?

  7. molj
    Member
    Posted 9 months ago #

    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: http://codex.wordpress.org/Nginx

    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 900-ponnod.com.vhost 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!

    Matej

Reply

You must log in to post.

About this Topic