WordPress.org

Ready to get started?Download WordPress

Forums

Problem with displaying posts (8 posts)

  1. magdabis
    Member
    Posted 3 years ago #

    Hi Guys

    I just installed wordpress and I've been playing with posts. When I publish new post it appears on a homepage but when I click on it's title to open it, I get an error. It's the same when I write a post and want to preview it. You can have a look and see what I mean http://www.destination-world.net
    Any idea what could be the problem?
    Thanks

  2. Leon
    Member
    Posted 3 years ago #

    Try to resave the permalink structure and make sure your htaccess is up to date.

  3. David Gard
    Member
    Posted 3 years ago #

    It could be a permalink issue - try logging on to the backend and go 'Settings -> Permalinks' and set them to default, then load your site and try again (Cool picture by the way - I went there a few years ago and it is an awsome city!).

    If it is this, try deleting your .htacess file ({Wamp Folder}/www/.htacess) and then set your permalinks back to how you had them - this should recreate the .htacess file and add the correct rewrite rules.

    Also, check your 'httpd.conf' file (apache settings) and ensure that the following line DOES NOT have a hash symbol '#' before it -

    LoadModule rewrite_module modules/mod_rewrite.so

  4. Leon
    Member
    Posted 3 years ago #

    Then make sure your .htaccess is writable. If it isn't, WordPress will tell you this, after you saved the permalink structure. Then you can manually add the lines shown to your htaccess.

  5. magdabis
    Member
    Posted 3 years ago #

    OMG I have no idea what you guys talk about when you mention all those htaccess and httpd.conf things but I will look it up and try to sort it out :)

    It seems that reversing permalink settings to default helped :) Thanks for your advise :)

  6. Leon
    Member
    Posted 3 years ago #

    Well it was a problem with your permalinks.

    When you want so called 'pretty links' where e.g. the title of the post is in the URL, it needs to rewrite this on your server.

    You can adjust these settings, and then the lines that wordpress provides

    e.g.

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

    needs to be added in the htaccess file. This file is in the root, same where wp-config.php is. If it doesn't exist, create a file here called .htaccess (create a file on your pc and call it h.htaccess) upload it, and change the name to .htaccess.

    Edit this file, with the rewite lines wordpress gives you, after creating a permalink structure.

    hope this is clear to you.

  7. magdabis
    Member
    Posted 3 years ago #

    Can I ask for some more help? This is what I did but I'm not sure how to proceed:
    - I created a new file called .htaccess with this content
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    - I uploaded this file. It now sits in /www/.htacess

    Is this the right content? Response above says "Edit this file, with the rewite lines wordpress gives you, after creating a permalink structure" but what does it mean? How do I get those rewrite lines from wordpress?

    Excuse my ignorance but I don't know much about HTML...

    Appreciate your help

    Thanks
    M

  8. Leon
    Member
    Posted 3 years ago #

    No problem,
    this isn't HTML though :)

    the .htaccess needs to be in the same folder where your wp-config.php file is in.

    Now go to the permalink options page in wordpress.
    Set it to whatever permalink structure you would like. Then save it, and it should provide the right lines for you below the save button. If it does not display the lines, then it means your .htaccess is writable and wordpress updated the .htaccess file itself. It should be working fine after that.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.