Migrating to VPS

I’m unsure if this is the best forum for this topic but I can’t find a better one 🙂

I am attempting to migrate a Drupal 8 site from shared hosting to a VPS.

I have setup the directory and propagated the Database.

I have setup the mobile only sub domain m.domain.com.

At first I was not able to go to any page(on the primary domain) apart from the front of the website because I would get a 404 error.
I solved this by changing the owner of the files (initially they were set to root) to the correct owner.
I was then able to go to any page of the site (with the primary domain) but I would still get the 404 error when trying to navigate with the sub domain(front page would still show).

Now for some reason the domains have swapped, I can only navigate the whole website using the sub domain and the normal domain only shows the from page with links giving a 404 error again.

What am I missing? I’m guessing it has something to do with WHM and I’m missing an Apache extension?

I’ve googled and can only find information about older Drupal versions.
Thanks for anyone’s input 🙂

Here’s the complete error log that I get after browsing the mobile domain as well as the main domain and getting a 404 error.

[17-Jun-2017 10:44:22 UTC] Error: Class 'Swift_Message' not found in /home/account_name/public_html/modules/swiftmailer/src/Plugin/Mail/SwiftMailer.php on line 172 #0 /home/account_name/public_html/modules/mailsystem/src/Adapter.php(50): DrupalswiftmailerPluginMailSwiftMailer->mail(Array)
#1 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(291): DrupalmailsystemAdapter->mail(Array)
#2 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(173): DrupalCoreMailMailManager->doMail('update', 'status_notify', '[email protected]', 'en', Array, NULL, true)
#3 /home/account_name/public_html/core/lib/Drupal/Core/Render/Renderer.php(574): DrupalCoreMailMailManager->DrupalCoreMail{closure}()
#4 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(174): DrupalCoreRenderRenderer->executeInRenderContext(Object(DrupalCoreRenderRenderContext), Object(Closure))
#5 /home/account_name/public_html/modules/mailsystem/src/MailsystemManager.php(73): DrupalCoreMailMailManager->mail('update', 'status_notify', '[email protected]', 'en', Array, NULL, true)
#6 /home/account_name/public_html/core/modules/update/update.fetch.inc(41): DrupalmailsystemMailsystemManager->mail('update', 'status_notify', '[email protected]', 'en', Array)
#7 /home/account_name/public_html/core/modules/update/update.module(261): _update_cron_notify()
#8 [internal function]: update_cron()
#9 /home/account_name/public_html/core/lib/Drupal/Core/Extension/ModuleHandler.php(391): call_user_func_array('update_cron', Array)
#10 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(223): DrupalCoreExtensionModuleHandler->invoke('update', 'cron')
#11 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(122): DrupalCoreCron->invokeCronHandlers()
#12 /home/account_name/public_html/core/lib/Drupal/Core/ProxyClass/Cron.php(75): DrupalCoreCron->run()
#13 /home/account_name/public_html/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(65): DrupalCoreProxyClassCron->run()
#14 /home/account_name/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupalautomated_cronEventSubscriberAutomatedCron->onTerminate(Object(SymfonyComponentHttpKernelEventPostResponseEvent), 'kernel.terminat...', Object(DrupalComponentEventDispatcherContainerAwareEventDispatcher))
#15 /home/account_name/public_html/vendor/symfony/http-kernel/HttpKernel.php(84): DrupalComponentEventDispatcherContainerAwareEventDispatcher->dispatch('kernel.terminat...', Object(SymfonyComponentHttpKernelEventPostResponseEvent))
#16 /home/account_name/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): SymfonyComponentHttpKernelHttpKernel->terminate(Object(SymfonyComponentHttpFoundationRequest), Object(DrupalCoreRenderHtmlResponse))
#17 /home/account_name/public_html/core/lib/Drupal/Core/DrupalKernel.php(634): StackStackedHttpKernel->terminate(Object(SymfonyComponentHttpFoundationRequest), Object(DrupalCoreRenderHtmlResponse))
#18 /home/account_name/public_html/index.php(22): DrupalCoreDrupalKernel->terminate(Object(SymfonyComponentHttpFoundationRequest), Object(DrupalCoreRenderHtmlResponse))
#19 {main}
[17-Jun-2017 10:44:31 UTC] Error: Class 'Swift_Message' not found in /home/account_name/public_html/modules/swiftmailer/src/Plugin/Mail/SwiftMailer.php on line 172 #0 /home/account_name/public_html/modules/mailsystem/src/Adapter.php(50): DrupalswiftmailerPluginMailSwiftMailer->mail(Array)
#1 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(291): DrupalmailsystemAdapter->mail(Array)
#2 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(173): DrupalCoreMailMailManager->doMail('update', 'status_notify', '[email protected]', 'en', Array, NULL, true)
#3 /home/account_name/public_html/core/lib/Drupal/Core/Render/Renderer.php(574): DrupalCoreMailMailManager->DrupalCoreMail{closure}()
#4 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(174): DrupalCoreRenderRenderer->executeInRenderContext(Object(DrupalCoreRenderRenderContext), Object(Closure))
#5 /home/account_name/public_html/modules/mailsystem/src/MailsystemManager.php(73): DrupalCoreMailMailManager->mail('update', 'status_notify', '[email protected]', 'en', Array, NULL, true)
#6 /home/account_name/public_html/core/modules/update/update.fetch.inc(41): DrupalmailsystemMailsystemManager->mail('update', 'status_notify', '[email protected]', 'en', Array)
#7 /home/account_name/public_html/core/modules/update/update.module(261): _update_cron_notify()
#8 [internal function]: update_cron()
#9 /home/account_name/public_html/core/lib/Drupal/Core/Extension/ModuleHandler.php(391): call_user_func_array('update_cron', Array)
#10 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(223): DrupalCoreExtensionModuleHandler->invoke('update', 'cron')
#11 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(122): DrupalCoreCron->invokeCronHandlers()
#12 /home/account_name/public_html/core/lib/Drupal/Core/ProxyClass/Cron.php(75): DrupalCoreCron->run()
#13 /home/account_name/public_html/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(65): DrupalCoreProxyClassCron->run()
#14 /home/account_name/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupalautomated_cronEventSubscriberAutomatedCron->onTerminate(Object(SymfonyComponentHttpKernelEventPostResponseEvent), 'kernel.terminat...', Object(DrupalComponentEventDispatcherContainerAwareEventDispatcher))
#15 /home/account_name/public_html/vendor/symfony/http-kernel/HttpKernel.php(84): DrupalComponentEventDispatcherContainerAwareEventDispatcher->dispatch('kernel.terminat...', Object(SymfonyComponentHttpKernelEventPostResponseEvent))
#16 /home/account_name/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): SymfonyComponentHttpKernelHttpKernel->terminate(Object(SymfonyComponentHttpFoundationRequest), Object(DrupalCoreRenderHtmlResponse))
#17 /home/account_name/public_html/core/lib/Drupal/Core/DrupalKernel.php(634): StackStackedHttpKernel->terminate(Object(SymfonyComponentHttpFoundationRequest), Object(DrupalCoreRenderHtmlResponse))
#18 /home/account_name/public_html/index.php(22): DrupalCoreDrupalKernel->terminate(Object(SymfonyComponentHttpFoundationRequest), Object(DrupalCoreRenderHtmlResponse))
#19 {main}
[17-Jun-2017 10:44:46 UTC] Error: Class 'Swift_Message' not found in /home/account_name/public_html/modules/swiftmailer/src/Plugin/Mail/SwiftMailer.php on line 172 #0 /home/account_name/public_html/modules/mailsystem/src/Adapter.php(50): DrupalswiftmailerPluginMailSwiftMailer->mail(Array)
#1 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(291): DrupalmailsystemAdapter->mail(Array)
#2 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(173): DrupalCoreMailMailManager->doMail('update', 'status_notify', '[email protected]', 'en', Array, NULL, true)
#3 /home/account_name/public_html/core/lib/Drupal/Core/Render/Renderer.php(574): DrupalCoreMailMailManager->DrupalCoreMail{closure}()
#4 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(174): DrupalCoreRenderRenderer->executeInRenderContext(Object(DrupalCoreRenderRenderContext), Object(Closure))
#5 /home/account_name/public_html/modules/mailsystem/src/MailsystemManager.php(73): DrupalCoreMailMailManager->mail('update', 'status_notify', '[email protected]', 'en', Array, NULL, true)
#6 /home/account_name/public_html/core/modules/update/update.fetch.inc(41): DrupalmailsystemMailsystemManager->mail('update', 'status_notify', '[email protected]', 'en', Array)
#7 /home/account_name/public_html/core/modules/update/update.module(261): _update_cron_notify()
#8 [internal function]: update_cron()
#9 /home/account_name/public_html/core/lib/Drupal/Core/Extension/ModuleHandler.php(391): call_user_func_array('update_cron', Array)
#10 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(223): DrupalCoreExtensionModuleHandler->invoke('update', 'cron')
#11 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(122): DrupalCoreCron->invokeCronHandlers()
#12 /home/account_name/public_html/core/lib/Drupal/Core/ProxyClass/Cron.php(75): DrupalCoreCron->run()
#13 /home/account_name/public_html/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(65): DrupalCoreProxyClassCron->run()
#14 /home/account_name/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupalautomated_cronEventSubscriberAutomatedCron->onTerminate(Object(SymfonyComponentHttpKernelEventPostResponseEvent), 'kernel.terminat...', Object(DrupalComponentEventDispatcherContainerAwareEventDispatcher))
#15 /home/account_name/public_html/vendor/symfony/http-kernel/HttpKernel.php(84): DrupalComponentEventDispatcherContainerAwareEventDispatcher->dispatch('kernel.terminat...', Object(SymfonyComponentHttpKernelEventPostResponseEvent))
#16 /home/account_name/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): SymfonyComponentHttpKernelHttpKernel->terminate(Object(SymfonyComponentHttpFoundationRequest), Object(DrupalCoreRenderHtmlResponse))
#17 /home/account_name/public_html/core/lib/Drupal/Core/DrupalKernel.php(634): StackStackedHttpKernel->terminate(Object(SymfonyComponentHttpFoundationRequest), Object(DrupalCoreRenderHtmlResponse))
#18 /home/account_name/public_html/index.php(22): DrupalCoreDrupalKernel->terminate(Object(SymfonyComponentHttpFoundationRequest), Object(DrupalCoreRenderHtmlResponse))
#19 {main}
[17-Jun-2017 10:44:54 UTC] Error: Class 'Swift_Message' not found in /home/account_name/public_html/modules/swiftmailer/src/Plugin/Mail/SwiftMailer.php on line 172 #0 /home/account_name/public_html/modules/mailsystem/src/Adapter.php(50): DrupalswiftmailerPluginMailSwiftMailer->mail(Array)
#1 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(291): DrupalmailsystemAdapter->mail(Array)
#2 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(173): DrupalCoreMailMailManager->doMail('update', 'status_notify', '[email protected]', 'en', Array, NULL, true)
#3 /home/account_name/public_html/core/lib/Drupal/Core/Render/Renderer.php(574): DrupalCoreMailMailManager->DrupalCoreMail{closure}()
#4 /home/account_name/public_html/core/lib/Drupal/Core/Mail/MailManager.php(174): DrupalCoreRenderRenderer->executeInRenderContext(Object(DrupalCoreRenderRenderContext), Object(Closure))
#5 /home/account_name/public_html/modules/mailsystem/src/MailsystemManager.php(73): DrupalCoreMailMailManager->mail('update', 'status_notify', '[email protected]', 'en', Array, NULL, true)
#6 /home/account_name/public_html/core/modules/update/update.fetch.inc(41): DrupalmailsystemMailsystemManager->mail('update', 'status_notify', '[email protected]', 'en', Array)
#7 /home/account_name/public_html/core/modules/update/update.module(261): _update_cron_notify()
#8 [internal function]: update_cron()
#9 /home/account_name/public_html/core/lib/Drupal/Core/Extension/ModuleHandler.php(391): call_user_func_array('update_cron', Array)
#10 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(223): DrupalCoreExtensionModuleHandler->invoke('update', 'cron')
#11 /home/account_name/public_html/core/lib/Drupal/Core/Cron.php(122): DrupalCoreCron->invokeCronHandlers()
#12 /home/account_name/public_html/core/lib/Drupal/Core/ProxyClass/Cron.php(75): DrupalCoreCron->run()
#13 /home/account_name/public_html/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(65): DrupalCoreProxyClassCron->run()
#14 /home/account_name/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupalautomated_cronEventSubscriberAutomatedCron->onTerminate(Object(SymfonyComponentHttpKernelEventPostResponseEvent), 'kernel.terminat...', Object(DrupalComponentEventDispatcherContainerAwareEventDispatcher))
#15 /home/account_name/public_html/vendor/symfony/http-kernel/HttpKernel.php(84): DrupalComponentEventDispatcherContainerAwareEventDispatcher->dispatch('kernel.terminat...', Object(SymfonyComponentHttpKernelEventPostResponseEvent))
#16 /home/account_name/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): SymfonyComponentHttpKernelHttpKernel->terminate(Object(SymfonyComponentHttpFoundationRequest), Object(DrupalCoreRenderHtmlResponse))
#17 /home/account_name/public_html/core/lib/Drupal/Core/DrupalKernel.php(634): StackStackedHttpKernel->terminate(Object(SymfonyComponentHttpFoundationRequest), Object(DrupalCoreRenderHtmlResponse))
#18 /home/account_name/public_html/index.php(22): DrupalCoreDrupalKernel->terminate(Object(SymfonyComponentHttpFoundationRequest), Object(DrupalCoreRenderHtmlResponse))
#19 {main}
Drupal version: 


Source: https://www.drupal.org/taxonomy/term/22/feed