Moving wordpress site from subdomain to domain with 1 caveat - wordpress

I already have wordpress installed in my root, but I haven't built anything on it.
All these while I have been building on my subdomain, which is also using wordpress.
Now I have come to the conclusion to move everything I have from the subdomain to the root.
Are there anything I should take note of? Should I remove the wordpress installation that is in my root?
I'm using cpanel # hostgator

Remove the wordpress installation that is in your root directory, then copy all the files from the sub-domain's folder to your root directory. You should note that before moving the files, log into the existing Wordpress dashboard and under Settings -> General you need to change the URLs of your site first, otherwise you won't be able to log in once your site is moved. That's it.

Related

Move WordPress site from example.com/dir to example.com (a stock WordPress theme already exists on example.com)

None of the guides I found mention how I delete the existing content on example.com so I'm only left with what's now on example.com/dir but at the URL example.com.
When I try change it in Settings → General → Change URL, it destroys the website on example.com/dir, but nothing happens on example.com.
What I want is to take our testing site (on example.com/dir) to production page (on example.com).
I'm new to WordPress, but as I see it I can't delete the main directory through FTP and just move the testing directory to the main directory, but that is required to move it.
Make sure you have a backup of the site before deleting anything. Since there is a subdirectory site within the main site then to delete the main site (to make room for the subdirectory site to be moved to there) you will want to make sure you are deleting the WordPress installation for just the main site. So the WordPress files and folders that are specifically for the main site. Most likely that would be all files and folders in the web root of the main site besides the folder that the subdirectory site is within.
Once you have the main site cleared out then there are several services and plugins that can help migrating the subdirectory site to the main site's location. Here's a few I am familiar with and have seen others talk about:
magicmigration.com - has nothing to install (no plugin) and is automated
all-in-one wp migration - has a site size limit of I think 512MB without paying for pro, have to install a plugin to site
duplicator - free but you have to install a plugin to the site and can get hit hard by budget hosts, also has a pro version that can be paid for

Moved Wordpress to a subdirectory, don't want site-url to redirect to my subdirectory

I've searched a while but couldn't find an answer to this question yet. I had WP originally installed in the site root and moved it to a subfolder and went through the common steps necessary. I do this because I want to run wordpress only for blogging reasons and keep another HTML site as my main project that I want to access through my domain www.example.com and the wordpress blog through www.example.com/blog/
I moved the WP system therefore to /blog and changed the site address and wp address to that folder and followed the usual steps. Everything works just fine. Still when I enter my domain it redirects automatically to the /blog subdirectory and not to the site that lies in the root that has a index.html. There is no .htaccess file in the root or anything similar. How is that possible? Happy about all suggestions.

htacess for root folder with wordpress install and subdirectory for another domain

I have a wordpress install in my website directory e.g.( public_html/wp-content, public_html/wp-admin, public_html/wp-includes) and I have a subdirectory to which points to another domain public_html/anotherdomain.com
I don't want the another domain messing up the root wordpress install.
ex. anotherdomain.com should only go to public_html/anotherdomain.com and originialdomain.com should access public_html folder excluding the anotherdomain.com.
My question is what is the best approach for this?
using htaccess?
using the cpanel addon domain and make a subdirectory for the wordpress install?
If you use .htaccess you can block access to anotherdomain.com from your wordpress site. This will work but is kind of a sloppy hack and doesn't plan for the future pretty well. Are you going to keep doing this when you get more domains and install them.
The cleaner way to do it is what I think you are saying in your number 2. Give the wordpress site it's own directory that is a peer with anotherdomain.com. This way it will work the same if you have 1, 2, or 10 domains.

Wordpress - Moving website admin section

I have successfully moved a wordpress site from /test directory to the root, so now the website url looks like www.example.com. Fine.
However the admin section (wp-admin) still points to /test directory and so the url looks like www.example.com/test/wp-admin/...
How can I make it like www.example.com/wp-admin/...?
Please notice that I'm not interested in a simple redirection (now the customer is able to access the admin section with www.example.com/wp-admin, but then he's redirected to www.example.com/test/wp-admin/..., and it's not what he wants.
Thanks in advance
Everything is documented in http://codex.wordpress.org/Moving_WordPress
You may need to change many URLs in post/page content; if so, see https://github.com/interconnectit/Search-Replace-DB as suggested in the above Docs.
There is no need to create a new Wordpress install.
Also see http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install if you want to keep core Wordpress files and folders in a subfolder, but have the site appear to be at root for the end user.
You should not move wordpress this way. Here is what you do:
Install Clean Wordpress Installation on the new domain.
(www.original.com)
Use a plugin* to make back-up on your test domain.
(www.original.com/test/)
Install plugin* on the new domain, and restore back-up from test
domain. (www.orignal.com)
Update your style.css, header.php, index.php & footer.php if it
contains hard written links to your test domain.
You cannot simply move a wordpress installation - as most entries, links etc. are stored in the database. If you move folders in your ftp they will still point to the old database. This is why you have to duplicate your site, where the database entries will be automatically updated to your new site domain. Hard written links in any theme php files will have to be updated.
Although your problem depends on how your pointers/sites are set-up in c-panel. If you have to change pointers for your directory, you might have to back-up your website and upload it to a different domain so your new site can access the restoration back-up file via http request.
*Plugins such as wp clone, duplicator.

Pass through wordpress Folder to root folder

I have a wordpress installation on a site. It was placed inside ~/wp.
I've moved it yesterday to the root folder, ~/. However, a lot of the theme references and images still point out to ~/wp.
Instead of finding all these places(which may be hundreds), I'd like to pass through ~/wp to the root folder. Meaning, when the user goes to http://www.site.com/wp/thing.php , he'll actually be inside ~/thing.php, without changing the url.
Would this be possible with .htaccess changes? and if so, how?
It's a config setting - in Settings -> General you are given two options, WordPress Address (URL) and Site Address (URL).
You have the former pointing at the directory with the Wordpress installation in it and the latter at the root of your site.
Here's the Codex info on it;
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install
Incidentally, modifying all the files paths is another option of course - you would use the same technique you would use when transferring a Wordpress site from localhost to live, or from a dev server to live. You can look at the second part of my answer in this thread;
How to push wordpress from mamp into hostgator
That interconnectit script is a huge timesaver when moving WP sites.

Resources