Switching default website
-
Hello there,
I started mocking up the draft of a new site at domain.com/new, it is now complete and I'd like for that to be domain.com, and I'd like to move whatever is at domain.com to be the sub (domain.com/sub). I actually don't even need the sub but it's a security step. Is there a way to switch over?
Thank you! -
backup your databases and files of both sites, using a plugin like:
https://updraftplus.com/so i think you have your "domain.com/new" website on your ftp server under the folder "new"
and your site of www.domain.com you have in your "/" ftp folder.
so i think you need to create a new folder in your ftp called "sub", then move your site in "/" to "/sub/" (but dont move the folder "new" into "sub")
then using a FTP client like https://filezilla-project.org/ move the files inside "/new/" to "/"
then login to your wordpress site at www.domain.com/wp-admin/ (which was previously at "/new/")
install the plugin
https://wordpress.org/plugins/better-search-replace/use it to replace any database URL occurences of www.domain.com/new/ with www.domain.com
maybe that works!
-
Thanks @arminunruh ! I'm in my cPanel File Manager right now but I don't see a /new anywhere. I don't see it in home director or public_html. Do you know where this would live?
-
Update @arminunruh I actually found this, and this worked for me!
https://www.forge12.com/en/blog/change-the-primary-block-in-wordpress-multisite/?unapproved=3304&moderation-hash=87ad761a398fcc0027c32c6867d303c9#comment-3304The only thing is, the URL is still rothkuo.com/two instead of just / and I'm unable to change it in My Sites > Network Admin > Edit Site > Settings. And the permalinks still go to rothkuo.com/two even though initially when you go to rothkuo.com it all works. I don't mind it too much but if you have a solve for that, I'd love to try it.
-
I'm unable to change it in My Sites > Network Admin > Edit Site > Settings
you're not supposed to change it there,
you need to use the plugin as i said:install the plugin
https://wordpress.org/plugins/better-search-replace/use it to replace any database URL occurences of www.domain.com/two/ with www.domain.com
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it