• Hi There,

    Not sure if I am posting in the right area, but here’s hoping.

    I have a client that uses his server to host a plethora of different sites. I am currently working on a new wordpress site for one of his sites that is in a sub-directory, while that current site sits in another sub-directory.

    When the time comes, how do I go about redirecting the current site into the new sub-directory folder with the new wordpress site?

    It’s probably really obvious, but I just want to make sure I don’t botch it. haha

    Thanks again for any advice or help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You should give this a read.

    Be sure to follow the steps very closely as doing things out of order may turn the process into a bit of a pain for you. If you have any specific questions that you don’t understand, feel free to post it here.

    Thread Starter pettar2462

    (@pettar2462)

    Hi Craig!

    Thanks for the link. ??

    So what I originally did was create a new sub-directory with a whole new WordPress and theme, images etc.

    So I don’t really need to move over files and images, since it was basically a clean set up in that new sub-directory.

    Is it possible to just switch the Site Address (URL) in the new sub-directory and adjust the .htaccess file? And then shut- down the old site sub-directory folder?

    Thanks!
    Tara

    You will probably need to do a search and replace (always backup first) through your database and site files for references of the sub-directory and change them to the primary domain. I use this tool https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Then you should be able to just adjust the WordPress URL to point to the sub directory and the Site URL to point to the primary domain.

    EDIT: Now that I think about it, I don’t think you need to search and replace if the WordPress installation is staying in the sub-directory. You should just be able to point the WordPress URL at the sub-directory.

    Thread Starter pettar2462

    (@pettar2462)

    Morning ~ (sorry this is going to be a bit long so you understand what I did haha)

    So it turns out the clients actual url for this site is a subdomain. I called up the hosting company and had them switch the subdomain url to the new wordpress folder on the server.

    However when the transition was complete, and the new site was now showing under the correct url, I noticed that only the home page was reading as the subdomain url and when I clicked on links within the new wordpress site, such as “about”, the url would read as the actual wordpress url that I had created the new site in, and not the subdomain url.

    I figured I could change this by switching the “Site Address (URL)” under general settings to the subdomain url, easy peasy, which did work, but I had to go and change all the links throughout the site to read correctly. I also changed the permalinks and adjusted the .htaccess file accordingly.

    My only problem now, is I have some “load more” blog post buttons and font awesome icons that are not loading at all since I switched all of this, or not working when they are clicked.

    I contacted the theme developers for help and they said that this was because…

    “The problem is due to the domain switch that you have done. To fix that you need to move the files from “wordpresssite2015″ to root and in the general settings you need to have the wordpress URL and site URL as https://www.subdomainURL.com. Please update it and have a look.”

    I already have a main primary wordpress running from the root folder (totally different from this site I am talking about – and the primary’s site’s .htaccess and index.php are actually only in the root folder-and in a separate folder on the server), can I also have this entirely different wordpress site running from the root? That makes no sense to me.

    I’m kind of at a loss at what to do right now to make everything run smoothly (aka the load more posts btn and the font awesome files to actually show). You know losing sleep and tossing and turning. ??

    Any information or ideas would be greatly appreciated as always!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Subdirectory to a new subdirectory’ is closed to new replies.