Wordpress - subdomain to root - wordpress

I've been building a wordpress site on a subdomain while having my old website in the root directory. Now I have finished the site and would like to move it into the root. Is there a way how to 'redirect' my site so I don't need to move all the files and databases from the subdomain? The address should appear as www.myweb.com, though.
I have these folders in my FTP:
public_html, _sub, tmp
The subdomain is currently located at _sub/wc/
Thanks!

This codex article should explain the process, I've used it successfully myself several times: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install

According to wordpress you can leave your files where they are and put the following into your wp-config file:
define('WP_SITEURL', 'http://www.example.com/new/');
define('WP_HOME', 'http://www.example.com/new/');
Or you can:
In the box for WordPress address (URL): change the address to the new
location of your main WordPress core files. Example:
http://example.com/wordpress
In the box for Site address (URL): change
the address to the root directory's URL. Example: http://example.com
Take a look at moving wordpress: Moving_WordPress and editing the wp-config Editing_wp-config.php as well as Giving_WordPress_Its_Own_Directory
Wordpress gives a lot of information about moving domains etc, and it is well worth reading their documentation on the matter.
You may want to remove your old website files (it is good to have a back up of the old version anyway) so that they do not conflict (esp if they are WordPress).

Related

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.

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.

1 wordpress installation 2 domains

I have one installation of wordpress at domain1.co.uk.
I have another domain (domain2.com) and I have changed the A record so that it now points to the installation at domain1.co.uk whist keeping the domain2.com URL.
My issue is when I click any links within the wordpress site the URL changes to domain1.co.uk/pagename and does not retain the .com. I know the wordpress site address is setup to domain1.co.uk at the moment but I would like to be able to retain the domain2.com when visited from domain2.com throughout the site.
Is that possible?
Any help will be gratefully received!
You will either have to use wpmu somehow (wordpress multisite has been integrated into wordpress) or you can enable the wordpress (multisite feature)[http://codex.wordpress.org/Create_A_Network].
It is as easy as:
// wp-config.php
define('WP_ALLOW_MULTISITE', true);
Then going to the network setup tool, adding some more lines to the config, adding some lines to the htaccess, and creating an upload directory.

Wordpress blog doesn't show up online?

I have created a self-hosted wordpress blog and on my ftp server everything is under
/public_html/wordpress/..
then you have /wp-admin and /wp-content etc..
but when I got to my website the theme doesn't show up, it only shows a white page with
www.******.co.cc
" index of
/wordpress"
I figured out the wordpress blog has installed its own directory so if I want to see my website I need to enter that directory first. So I tried to type
www.*******.co.cc/wordpress/
and it worked my website is all here.
BUT ! I don't wanna have people to type www.**.co.cc/wordpress/ since the site was originially known without adding /wordpress at the end.
If I move all my wordpress folders under the root
/public_html .. will it work ??
See http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory to move the site to root.
After the move, if all you see is "index of...", add
DirectoryIndex index.php
at the top of .htaccess
Under Settings > General
Check your site address(url) and wordpress address(url) to make sure they are set how you want them.
The site address should have the url for where you want people to view the page (without the wordpress extension. )
You most likely also have to move your index.php and .htaccess file out of the wordpress file and into the root folder.
Go here: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory and
View the instructions under the heading "Using a pre-existing subdirectory install"
It is good to have FTP running while you do this in case you lock yourself out of the admin by inserting an incorrect filepath.
This is because you have installed your wordpress script in the
public_html >> wordpress
Install your wordpress in the root i.e left the directory field empty
/

Resources