• Hello,

    I am having a difficult time troubleshooting a permalink issue.

    I recently moved my website and now my permalink setting does not work.

    This is what does work:

    1. I was able to move all of the wordpress files from hosting service to my own linux machine. The files including the .htaccess have not been changed.

    2. I was able to move the database to the new machine. It works well. All of the data is in tack.

    The only problem I see is that when I test my site the page links don`t point to the correct location. Since I have not changed anything from one machine to the next I would guess that everything should work fine….of course it does not.

    I have read through some of the help documentation on permalinks in regards to permission and the type of permalink.
    Permission is ok as I was able to update the .htaccess file easy enough.

    One thing I have noticed …..I am using /%postname%/ in the custom permalink field. I tried changes this to /%month%/%year%/%postname%/ and tested a page. The permalink did change to the new format. However the page was still not loaded.

Viewing 6 replies - 16 through 21 (of 21 total)
  • Do you know how I can change the permission of wordpress so it has a user level permission?

    Assuming your wordpress files are installed in /var/www/wordpress, and apache is running as group www-data, I think this will do it;

    As root:

    chown -R [username]:www-data /var/www/wordpress

    …and this should set file and directory permissions recursively:

    cd /var/www/wordpress

    find . -type f -exec chmod 644 {} \;

    find . -type d -exec chmod 755 {} \;

    Obvious permissions exceptions will have to be reset on the uploads folder and .htaccess if you intend to use the uploads folder locally, or if you want wordpress to update .htaccess automatically.

    I think all those commands are correct. You may want to verify them first, though.

    Another possible issue: Have you ever attempted to install the wordpress package from the Ubuntu repository on that server using apt-get from the command line or synaptic?

    Thread Starter Spindler

    (@spindler)

    This is helpful….To bad it is not in the setup instructions someplace.

    I was able to set the user and group for all of the necassary files. So now I do not need to use 777 to change the .htaccess…..This is very nice.

    Ofcourse….changing the permissions did not solve my permalink issue. The problem still remains that when I use the default setting I can see the pages correctly even though the slug is in correct.

    I am not sure what else I could possible do to correct this issue. I am thinking wordpress does not like the way I installed 3.0.1 At least now the error I see is affecting all of my sites on my machine.

    This is helpful….To bad it is not in the setup instructions someplace.

    That’s sort of an unreasonable expectation.

    – But here’s some instructions that might help put it to rest for you. I’ve used this method a couple dozen times with solid success, and no .htaccess or permalink issues ever.

    This is one Ubuntu/WordPress install method that works reliably for me – strictly as a personal installation. This assumes that all the prerequisites are installed and functioning correctly, and you have not attempted to install WordPress using aptitude or the package manager. Although the instructions are generic, I used this method on my own laptop with Ubuntu. This gives absolutely no consideration at all to “server” security, application hardening, FTP or SSH. This setup is not intended to face the WAN.

    Open a terminal:

    username@username-laptop:~$ sudo -i
    [sudo] password for username: [password]
    root@username-laptop:~# cd /var/www
    root@username-laptop:/var/www# mkdir wordpress
    root@username-laptop:/var/www# chown username:www-data wordpress
    root@username-laptop:/var/www# chmod 0750 wordpress
    root@username-laptop:/var/www# logout
    username@username-laptop:~$ ln -s /var/www/wordpress /home/username/wordpress
    username@username-laptop:~$ exit

    You now have a WordPress directory at /var/www/wordpress with owner [username] and group www-data. You also now have a symlink/shortcut to that directory in Home.

    Download the latest WordPress package and extract the files. Edit and rename wp-config-sample.php per the WordPress installation instructions. Copy the entire contents of the extracted WordPress package, open the symlink in your home folder that points to /var/www/wordpress and paste all of the copied content into that directory.

    Point the browser to //localhost/wordpress and begin the install.

    You can now just open the symlink/shortcut you created in Home to add your themes and plugins and edit files without any ownership issues and no more command line sudo’ing or “sudo nautilus” every time you want access to WordPress files.

    Thread Starter Spindler

    (@spindler)

    This look like instruction to install wordpress. Unfortunately I have done these steps without any issue.

    The real problem starts when I try to use pretty parmalink. I am currently investigating the parmalink FAQ page to see if I missed something.

    http://codex.wordpress.org/Using_Permalinks

    Unfortunately I have done these steps without any issue.

    Yes. I can see you’ve had no issues at all. 🙂

    …take a look at this then. Maybe it will put you onto something helpful.

    /etc/apache2/sites-available/default

    AllowOverride None ??

    Thread Starter Spindler

    (@spindler)

    Yes…..AllowOverride is the problem I was having.

    I was able to fix this by changing the virtual host.

    Thanks a lot.

Viewing 6 replies - 16 through 21 (of 21 total)

The topic ‘Permalink changed after moving website’ is closed to new replies.