6

I moved my site from slichost to Amazon ec2. After moving i made necessary settings for wordpress. My first page for wordpress works fine, but the permalinks are not working. Can anyone please let me know what changes are necessary to make the permalinks working.

Thanks

Atul
  • 4,463
  • 5
  • 23
  • 19
  • What is the issue if I am right they are still pointing the old location. Is it your problem? – Shakti Singh Dec 01 '10 at 13:11
  • 1
    Could you describe what "not working" means, please? Can you give us an example of one of the permalinks that isn't working, and give us details of what happens when you try to use it? – Matt Gibson Dec 01 '10 at 13:45
  • Straight-off-the-bat without further info, have you checked you've got an `.htaccess` in your public root, with `mod_rewrite` enabled and the appropriate rules? – TheDeadMedic Dec 01 '10 at 19:57
  • @Atul Did you have a correct answer? Can you please mark it as correct if there is any which answer to your original question? – Daniele B Nov 29 '12 at 08:06
  • Please check this answer: https://stackoverflow.com/questions/19156711/permalinks-in-wordpress-not-working-on-localhost-but-work-perfectly-on-live-serv/29171234#29171234 – Saurin Dashadia Jun 13 '18 at 07:43

8 Answers8

8

Check your apache configuration and verify that for the directory in which you store your Wordpress installation you have following settings enabled (probably you will have more configuration options for the specific directory, but these are the minimum required for Wordpress fancy permalinks):

<Directory var/www/>
Options FollowSymLinks
AllowOverride All
</Directory>
famx
  • 196
  • 1
  • 8
Cninroh
  • 1,796
  • 2
  • 21
  • 37
4

After moving to a new linux host and installing a fresh wordpress, we had to make ALL of the following changes in order to enable pretty permalinks.

  1. Create .htaccess in the correct folder, containing the code as suggested by Krige.
  2. Enable mod_rewrite on apache, then restart the server, as suggested by Mike Lynn.
  3. Change the apache configuration to FollowSymLinks and AllowOverride All for /var/www/, as suggested by Cninroh. For us /etc/apache2/sites-enabled/000-default was the file we had to edit.
ccsdg
  • 141
  • 3
1

I was having issues getting Permalinks (other than default) to work on Mac OSX and the following was very much useful. It seems that by default Mac's are not .htaccess ready by default and Apache will ignore the file until certain files (specified on the links below) are modified:

http://wordpress.org/support/topic/getting-pretty-permalinks-working-on-a-mac-105-server

http://clagnut.com/blog/350/

Hope that helps!

July
  • 11
  • 1
1

Create a .htaccess file in your wordpress directory and put into it the following code:

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

Source

Marco Lackovic
  • 6,077
  • 7
  • 55
  • 56
1

I was able to fix this by:

  • logging into wp-admin for my site
  • changing the Settings | Permalinks option to something different
  • save changes
  • changing the Settings | Permalinks option back to its original value
  • save changes

This seemed to re-enable permalinks, which did not originally work.

daveywc
  • 3,136
  • 7
  • 45
  • 58
0

While checking the apache configuration is essential and probably the first step, you also need to ensure that apache has the mod_rewrite module enabled... Depending upon the AMI from Amazon that you used, you will need to :

  • Install apache and conditionally enable mod_rewrite.

    a2enmod rewrite

  • Restart the server

    Aa

Stephan
  • 41,764
  • 65
  • 238
  • 329
0

When you set permalinks option other than default, the following code is already posted in .htaccess file.

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

# END WordPress

But that doesn't help as you already know.

So, this will work when you set rewrite_module, this can be done by going to "fix permissions" if available in your cpanel or you may contact your host.

Faizan Ali
  • 973
  • 2
  • 16
  • 32
0

Try adding index.php/ before the permalink path.

publicrelate
  • 109
  • 2