Switch over WordPress Site server

2019-03-05 10:52发布

I have WordPress Blog. Recently I have changed my hosting. So I downloaded all my blog files from old server with filezilla. On new server I made directory blog & under that I uploaded all files. I made new database on new server exactly as same as old one and uploaded that. Now my blog is active properly on my new hosting but whenever I try to login www.sitename.in/blog/wp-admin then it redirects me to the old domain i.e www.sitename.com/blog/wp-admin . How can I change this? My old hosting will expire soon & soon on old domain as well. How can I completely switch over to my new server?

3条回答
The star\"
2楼-- · 2019-03-05 11:05

Open your database and change the URL of wp-option check screenshot

http://awesomescreenshot.com/0d160xve67 If not work then open your database with notpad ++ editor then find your blog url something like "localhost/example"

In notpad++ ctrl+f and click to replace tab in first tab put your blog url something localhost/example in 2nd tab put your orginal website url something like example.com

now hit the replace all tab from right side then ctrl+s . make zip and reinstall your database it will fix all url like images , admin, site and pages sulgs etc hope it will work

查看更多
倾城 Initia
3楼-- · 2019-03-05 11:14

Verify, if you have followed below steps carefully.You might have missed 5th step

  1. Copy the files from localhost to web server using any file transfer tool(i.e. FileZilla).
  2. Remember the path to WordPress site,where you have copied files.(i.e. http://www.example.com or http://www.example.com/wordpress) . Don’t include forward trailing slash at the end of URL.
  3. Create Database on WebServer and import Database into it. Remember to list the database credentials(i.e. database name,database user,database password) as you need it for further steps.
  4. Open “wp-config.php” file on WebServer and put database database credentials in it.
  5. Open “wp_options” table from the database on WebServer.Look for “siteURL” and “home” entries in “option_name” column.Put your WordPress site URL as value for those entries.
  6. Now browse your WordPress site URL.You will see your website live.
查看更多
Bombasti
4楼-- · 2019-03-05 11:20

According to this step 4

Log in to the site you want to move and go to Settings > General, then change the URLs. (ie from http://example.com/ to http://example.net ) - save the settings and expect to see a 404 page.

查看更多
登录 后发表回答