Switch over WordPress Site server

情到浓时终转凉″ 提交于 2019-12-04 05:51:29

问题


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?


回答1:


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




回答2:


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.




回答3:


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.


来源:https://stackoverflow.com/questions/38408274/switch-over-wordpress-site-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!