简体   繁体   中英

Changing URL Wordpress- still not working despite checking/editing database

As much as may sound like a broken record - I changed the URLs on my WP site, and now I get a 404.

What I wanted to do:

Change site URL from www.SiteA.com to www.SiteB.com All WP files were at the time in another directory in the same hosting account. I needed them in the root directory, accessible by www.SiteB.com

What I did:

  1. Backed up locally and remotely - Database and files.
  2. Edited URL's through dashboard on WP - got a login error afterward, but seemed to do it anyway.
  3. Moed ALL old site files from root to backup folder.
  4. Moed ALL wordpress files from original directory to root directory.

Then I got a 404 error and was unable to access WP-admin or login through the new or old URL.

What I tried to fix the issue:

Noticed http should be https - changed this in 'options' within phpmyadmin, both at 'siteurl' and in 'home'.

Still 404

Then I tried defining the db_name in the wp-config file.

Still 404

Then I gae up, changed the URL's back using myphpadmin, and moed the filed back to their original directory. Now I can login to WP as usual and eerything is fine.

Why can't I access the site when I moe it into the root directory - I thought I had all the steps right!

Thanks in adance for any help oh..and apologies, my keyboard is missing a few keys :(

Wordpress stores url/permalinks on database field values as well, changing only the configuration files will not be enough.

I am pretty sure there are other options, on my case i use often perform Wordpress website migrations, and the following tool becomes really handy when search and replacing domains on the database records.

https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

Hope it helps. Jose

This happened to be an SSL issue where the host for our SSL certificate was conflicting with the stylesheet somehow. 0_o

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM