If the URL has changed, updating home and site URL is not enough. You need to search and replace the URLs saved on the DB.
Use the method mentioned below the topic: “When Your Domain Name or URLs Change” to replace the old URLs. http://codex.wordpress.org/Moving_WordPress
Well actually I did search and replace all instances of the old url but I did it with notepad++ because I had done it before and it worked. Maybe there were no serialized strings in the one that worked before but there are a lot of them in this site so I’ll restore the database and then use the search and replace script from your link and see if that fixes it.
Thanks, I’ll be back in a few to post if it worked or not.
Not sure what happened but using the search and replace script screws the whole site up. It say’s be sure you know what tables to choose but if I knew anything other than site_url and home in wp-options I would have changed them myself.
Now when I go to the url of the site it changes the url and adds the number 25 to the end of it.
The dev site is dev.metrotechpc.com/proximus2 and when I go there it automatically changes to dev.metrotechpc.com/proximus2/25/ and tells me page not found.
I think I was better off before because the site at least worked with default permalinks.
Any other ideas?
Thanks
Try to go to your dashboard again and change your permalinks.
yeah, something wrong happened there.
I hope you have a DB backup so you can restore it as it were before and working with the default permalinks.
Is the htaccess the one you moved with the old install or it was created in this new install. If the first, set the permalinks to default, delete the htaccess and then set the permalinks to postname to see if a new one will be generated.
I agree.. Do that so it can generate a new .htaccess
I couldn’t go to the dashboard because the site wouldn’t load after running that search and replace script. I went in to mysql and see that it dropped the 2 off the end of the directory name. Above what I meant to say was that the url auto changes to dev.metrotechpc.com/proximus/25. But I fixed that by manually updating siteurl and home like I had done before. Only thanks to the script there are 540 places where it dropped the 2 off the directory name.
Now that I fixed that issue, permalinks still don’t work as ‘post’ type url and just like before, it’s writing the htacess file with no problem.
Here's the htaccess if you see anything wrong with it.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /proximus2/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /proximus2/index.php [L]
</IfModule>
# END WordPress
Thanks
I’ve deleted the htaccess and had wordpress recreate it several times.
I do have a backup which I”m going to go back to because even with the siteurl and home fixed all the images are missing since it changed those urls too.
could the use of a sub domain cause an issue? On my laptop where I have a working copy I use dev.local and put it in the hosts file.
For this dev server I have the subdomain dev.metrotechpc.com in dns on metrotechpc.com so it works but would the dev. in the front of the url be an issue? I don’t think so but just grasping at straws.
wow. This was a new dev server I set up. I’m posting this in case it helps anyone else. Have to remember to check the default server in /etc/sites-enabled/000-default and make sure Allow all is set here.
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
Or if using other virtual sites there should be a file for each one enabled.
Found it here along with a quick easy test to see if mod_rewrite is working. http://www.lavluda.com/2007/07/15/how-to-enable-mod_rewrite-in-apache22-debian/
Thanks Hfort and mheltone for your suggestions.
It’s working now so marking this one solved and adding to my list of things to check first 🙂