abbett.org

i.e. Jonathan Abbett — web crafter, healthcare designer, amateur kosher cheesemaker.

How to move WordPress to a new directory

3 October 2012
I tend to move WordPress sites relatively often, but not often enough to remember precisely how, hence this post.

In my typical situation, WordPress is installed in a subdirectory (subdirectory), and I'm moving it to the root directory.

  1. Start in the web root director.
  2. Back up your files

    tar -czvf subdirectory/ backup.tar.gz
    
  3. Log into the blog.

  4. Go to the Administration > Settings > General panel.
  5. Change the WordPress address (URI) value to your desired location. In my case, the Site address (URL) value is not modifiable -- that's done in the wp-config.php file.
  6. Click Save Changes. Your site is now, temporarily, inaccessible.
  7. Recursively copy the subdirectory files to the current root directory

    cp -R subdirectory/* .
    
  8. Edit wp-config.php and change the WP_HOME setting to the correct URL.

Job done.

comments powered by Disqus
Uncaught Exception

Uncaught Exception

Array and string offset access syntax with curly braces is deprecated

Origin

anchor/libraries/markdown.php on line 1396

Trace

#0 [internal function]: System\Error::shutdown()
#1 {main}