WordPress – Promoting A Dev Build In A Subdirectory To Production / Root Directory

…just point Apache’s root directory to /public_html/development

If you do this, I would seriously consider renaming “development” to “live” or something more meaningful, otherwise it’s going to get confusing going forward.

Then you can create an .htaccess file in the document root with just the following mod_rewrite directive to rewrite everything to the /live subdirectory (rename the old .htaccess file .htaccess-old or something).

RewriteEngine On

RewriteRule (.*) /live/$1 [L]

This avoids a rewrite loop because of the .htaccess file in the /live subdirectory that contains the WordPress front-controller (of the development/live site).

You will need to make sure the URL structure does not contain the /development path segment.

This is as close to changing the document root you can get, without actually changing the document root.