I'm setting up a Linode VPS with Apache 2 and Ubuntu 22. Our organization's objective is to host a WordPress e-commerce site together with 2 internal applications within this server. While I've got experience with other stacks as well as Linux, I'm pretty much new to WordPress.

When I installed Wordpress, I apparently created an html directory inside /var/www/ and inside said html directory I created the <vhost.com> folder that contains the actual WordPress installation.

I want to move my <vhost.com> from var/www/html/ to var/www/, since the html directory serves no purpose, its confusing and the other applications that'll be deployed from this VPS will be APIs, so it's more a "good practice" thing since they don't actually serve HTML.

However, prior to moving the directory I want to confirm if doing this move will misconfigure any links within the WordPress installation. I haven't done anything with the WP application besides the installation wizard (so it's only linked to a MySQL DB and its got its own user): no plugins or anything. Still, I want to be sure.

Can I just move the <vhost.com>directory without breaking anything inside?


1 Answer 1


You'll have to make sure that your web server knows about the change, but it shouldn't break anything inside WordPress. All the WP links are based on its URL, not its location on a disk. There are WP functions that reference disk locations (eg plugin_dir_path(), but they should all be relative to the site's root directory, not /.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.