At the moment I have a WordPress installation in a subfolder of my current site (example.com/wordpress
). How do I make it so that wordpress is accessible from a subdomain?
I.e. I would like wordpress to be accessible from this address: wordpress.example.com
, and that all the links, posts and pages will still work flawlessly, e.g. wordpress.example.com/my-wp-post/
If it makes a difference which host one is with, I am asking specifically about 1&1.
Thank you
If you want to use a subdomain with WordPress, you can either create entirely separate WordPress installs on each subdomain, or you can use a WordPress Multisite network to create separate sites on subdomains that are all powered by the same WordPress install.
Click on the dropdown icon next to the name of your website, then click on staging, and then enter the subdomain you created. That's it. If you prefer not to use this method or your hosting service doesn't use cPanel, you can try using a WordPress plugin.
Go to your GoDaddy product page. Under Web Hosting, next to the Linux Hosting account you want to use, select Manage. In the account Dashboard, in the Websites section, below the domain where you want to install WordPress select Install Application.
If you want to automatically install and use WordPress with your domain, log in to IONOS and select Domains under My Products. Next, choose a domain that is not in use yet. Click Create Website, and then start the WordPress setup process by clicking Get Started.
I am not a big fan of video tutorials, but I used this one to successfully set up a new subdomain and install wordpress.
Here is an overview of the process
After creating the a subdomain I use WP clone to create and install a backup of my live site into the new subdomain. The clone site allows me to verify updates before deploying them my public site.
Hopefully the OP has resolved this issue, but maybe this will be of use to others.
I think you have 2 options.
1) Manually:
Copy your wordpress install from the subfolder of your main domain to the subdomain's folder. Using a database editing tool (of your choice) go into the wp_options table and change the option_value of the option_name 'siteurl' and 'home'.
You might have a few other options that will need editing, but they are more often than not plugin specific.
2) A little better:
Create a new wordpress install in your subdomain. Copy your plugins, themes and uploads into it. Then, install the plugin wp-migrate-db-pro from https://deliciousbrains.com/wp-migrate-db-pro/ Use this plugin to copy the database from the subfolder install to the subdomain install. This plugin will globally search and replace the URLs and Folders for you.
I've been using this plugin for a while...and it saves me hours and hours of work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With