Support » Networking WordPress » Moving WP to new URL – Some things do not work

  • Resolved greenreader9

    (@greenreader9)


    Hello,
    So, I wanted to move my WP and WooCommerce site (Installed from softaculous) to a different URL. I added the new domain to the same hosting account, so it would show the exact same thing as the original domain (so both domains share the same files, databases, ect.) but just with the new domain in the address bar instead. However, WP would always redirect me to the original domain. I did not even see an option in Settings –> General to change the site URL, so I opened the MySQL databases and used the “search” feature to find all instances of my old URL in any database. I than changed all of the URLs to my new domain, except for those in the “wpih_posts” database (I am not using the commenting feature, and did not want to take the time to change the 84 instances of the domain in this database). Everything works fine (on the new domain) except for “Network Admin” account win wp-admin, which I need to add plugins and manage certain things I can’t seem to do in the normal dashboard. When going to My Sites –> Network Admin –> Dashboard (Or anything else in that menu) I just get a “Error establishing a database connection. If your site does not display, please contact the owner of this network. If you are the owner of this network please check that MySQL is running properly and all tables are error free.” error. I did notice that it redirected me back to the old domain before showing this error, and /wp-admin/network always redirects back to the old (original) domain. Also, the favicon in the admin area does not show, but I don’t really care about that.

    Did I do something incorrect when I changed the database values? I don’t see anything in a .htaccess file that is redirecting newdomain.tld/wp-admin/network to olddomain.tld/wp-admin/network. I am brand new to MySQL and databases, you sorry if the answer is obvious.

    Thanks, in advance,
    Greenreader9

    • This topic was modified 1 month ago by James Huff. Reason: moved to Networking WordPress since this is a Multisite issue
Viewing 2 replies - 1 through 2 (of 2 total)
  • catacaustic

    (@catacaustic)

    You may have done some damage by chaing the URL’s manually. The best thing to do is to restore a backup of the database that has the correct URL’s in it, and run a good search and replace plugin. I personally use this one:

    https://wordpress.org/plugins/better-search-replace/

    The problem is that WordPres sometimes stores URL’s in serialised arrays, and editing those pretty much breaks the array when the system tries to unserialise it back into a proper array. Plugins like the one above take care of all of that for you.

    Thread Starter greenreader9

    (@greenreader9)

    Thanks. I could get it working again, so I just deleted it (It was brand new, barley any customization) and re-installed manually (I was having issues), now the change URL box is there in General –> Settings is there (I did install that plugin, so maybe it made a difference) and it works. Thanks for your help @catacaustic!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.