Jump to content

Move Wordpress to subdirectory


Cowboy Denny

Recommended Posts

So I installed Wordpress under the root so it all lives under public_html but I would rather have another software (Invision Community) run under the root and I would like to maintain my Wordpress site so I can move stuff over and well keep it around until I'm done with it.

How do you move your site from public_html to public_html/wp

Create a Complete Backup of Your Website

I personally use UpDraft but you can use whatever you feel most comfortable with that includes all the files and database backup

 

Moving Your WordPress Files From Subdomain to Root Folder

however you want to do it but just move all the files that are in public_html over to your subdirectory which for me was public_html/wp

 

Change WordPress URL and Site URL Settings

Once you move the WordPress files, you will not be able to access the WordPress admin area on the root domain.

open wp-config.php and search for stop editing.  Right before that line in the file paste the following two lines (obviously changing to match your URL and whether you use http or https)

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

You can now visit your WordPress site’s admin area on the root domain name.

 

Update URL's

So now that you can get to your site you aren't done yet.  Many of the links inside Wordpress reference the old URL so you need a tool that will search and replace.  A great FREE tool is Velvet Blues Update URL's and it works great.  You enter the old and new and BAM, it tells you how many items were updated and you are all set.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...