How to remove the index.php from the pretty permalink in WordPress 2.5.x

How to remove the index.php from the pretty permalink in WordPress 2.5.x10.0104

I spent so much time on it and I am really tired.

I will go straight to the point:

1) FTP – Go on the main directory of your website (www.yourwebsite.com)

2) You should look for the file .htaccess (is an hidden file, so you should set your FTP client or your web-cpanel to show hidden files).

3) Open the .htaccess file, copy all the content and paste and save it in another file on your pc (this is helpful just in case things go wrong). Name this file “justincasethingsgowrong.htaccess”

4) Now delete the .htaccess file from your website.

5) Go on your WordPress admin panel and  set up  the pretty permalink as you like (without the index.php) and save it.

6) After saving, you will get a message that says you need to upload your .htaccess

7) create an empty .htaccess file and upload it in the main directory of your website (www.yourwebsite.com).

8) Try to access your website.

EVERYTHING SHOULD BE WORKING.

If it doesn’t, copy the code below inside your .htaccess (on the web):

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

Save it and everything will be fine.

Now you finally got rid of the index.php

If you still have troubles, just go back to the file “justincasethingsgowrong.htaccess” that you saved on your pc, and upload again that file on the main directory of your website and rename it with “.htaccess” (but in this case you won’t have solved the problem).

Good luck :)

Share/Save/Bookmark

VN:F [1.7.5_995]
Rating: 10.0/10 (4 votes cast)
VN:F [1.7.5_995]
Rating: +1 (from 3 votes)

Tags: , ,

15 Comments

  1. Fernando on 15.12.2008 at 01:36 (Reply)

    Hi! I´ve contacted my Hosting provider (ALPSHOST.COM) and they told me they dont support .htaccess edit…I think because it is a Windows primary based Hosting.

    Is there a workaround for me? I am migrating some Blogger Blogs to WordPress as it is much more flexible and I want to hold the same Permalinks I use to have in Blogger so I dont loose any linkback and indexed posts.
    Thanks for anyone for your help!

    UN:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.7.5_995]
    Rating: +1 (from 1 vote)
  2. Kh77 on 03.03.2009 at 13:09 (Reply)

    Hello

    Was this meant to be for IIS 6?

    UN:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.7.5_995]
    Rating: 0 (from 0 votes)
  3. invadercee on 08.11.2009 at 06:18 (Reply)

    Excellent solution. Thank you!

    UN:F [1.7.5_995]
    Rating: 5.0/5 (1 vote cast)
    UN:F [1.7.5_995]
    Rating: +1 (from 1 vote)
  4. Curtis McCormick on 11.11.2009 at 03:50 (Reply)

    I treid both of you options here and neither work. When I press the Custom Structure button without the index.php at the beginning of the line, as soon as I press Save Changes, it jumps up to Month and Name.

    I tried copying the code into the .htaccess file and that did not work. Any suggestions would be greatly appreciated.

    UN:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.7.5_995]
    Rating: 0 (from 0 votes)
    1. Marco on 11.11.2009 at 21:49 (Reply)

      What version of Wordpress are you using?
      Maybe the problem is there.
      By the way try once again cause so far the solutions above have always worked for all people that I know.
      Let me know.
      Thanks,
      Marco.

      UA:F [1.7.5_995]
      Rating: 0.0/5 (0 votes cast)
      UA:F [1.7.5_995]
      Rating: 0 (from 0 votes)
  5. weeeeeee on 11.01.2010 at 19:25 (Reply)

    Where to place the .htaccess file in the wordpress folders or in my host?
    Because I can’t find a .htaccess on my host or ftp
    P.S. I am using godaddy

    UN:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.7.5_995]
    Rating: 0 (from 0 votes)
  6. nmrdxt on 06.02.2010 at 10:42 (Reply)

    blast from the past… but hey, thanks a bunch, man. solved me a huge headache.

    UN:F [1.7.5_995]
    Rating: 5.0/5 (1 vote cast)
    UN:F [1.7.5_995]
    Rating: +1 (from 1 vote)
  7. Elma on 15.02.2010 at 13:18 (Reply)

    Worked perfectly!

    UN:F [1.7.5_995]
    Rating: 5.0/5 (2 votes cast)
    UN:F [1.7.5_995]
    Rating: +1 (from 1 vote)
  8. ash on 22.02.2010 at 04:57 (Reply)

    Works for me, Marco. Thanks very much for the great tip. I’ve been looking all day for a solution other than rewriting the site. This was easy

    UN:F [1.7.5_995]
    Rating: 5.0/5 (1 vote cast)
    UN:F [1.7.5_995]
    Rating: +1 (from 1 vote)
  9. Hamed on 19.03.2010 at 01:19 (Reply)

    thanx

    I needed this

    UN:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.7.5_995]
    Rating: 0 (from 0 votes)
  10. haran on 25.03.2010 at 18:37 (Reply)

    Thank u for this valuable posting

    UN:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.7.5_995]
    Rating: 0 (from 0 votes)
  11. Herbie Hysteria on 12.04.2010 at 12:36 (Reply)

    Works a charm. If you find you don’t have a .htaccess file, just create one in a new text document and upload via FTP. thanks for the straight-forward info.

    UN:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.7.5_995]
    Rating: 0 (from 0 votes)
  12. TulseTubDut on 03.05.2010 at 14:46 (Reply)

    Whats’s Up i am fresh to this, I stumbled upon this chat board I find It positively accessible and it has helped me tons. I should be able to contribute and help other people like it has helped me.

    Cheers, See You Later,

    UN:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.7.5_995]
    Rating: 0 (from 0 votes)
  13. [...] Na podstawie: How to remove the index.php… [...]

  14. Neil on 08.07.2010 at 16:02 (Reply)

    Thanks a bunch, one of those fine-tuning small jobs that made me want to end my life. Worked great in WordPress 3.0 when the provided text was inserted to the .htaccess file!

    UN:F [1.7.5_995]
    Rating: 0.0/5 (0 votes cast)
    UN:F [1.7.5_995]
    Rating: 0 (from 0 votes)

Leave a comment