Answers.Body: <p>You can add:</p>
  
  <pre><code>'aliases' =&gt; [
      'siteUrl' =&gt; 'http://yoursiteurl.com',
  ],
  </code></pre>
  
  <p>To your <code>config/general.php</code> or use:</p>
  
  <pre><code>'aliases' =&gt; [
      'siteUrl' =&gt; getenv('DEFAULT_SITE_URL'),
  ],
  </code></pre>
  
  <p>And define <code>DEFAULT_SITE_URL</code> in your <code>.env</code> file (better way).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-04T15:50:43.773Z
Answers.LastActivityDate: 2020-01-04T15:50:43.773Z
Answers.UserDisplayName: Oli
Body: <p>After following the instructions to upload, then upgrade alongside my installation of Craft 2, I first got a timeout error. </p>
  
  <p>I am now getting the following when trying to load any page, not just /admin - and can't see where siteUrl is defined anywhere to see where I could possibly change it.</p>
  
  <pre><code>yii\base\InvalidArgumentException: Invalid path alias: @siteUrl/ in /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php:154
  Stack trace:
  #0 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Request.php(1080): yii\BaseYii::getAlias('@siteUrl/')
  #1 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Request.php(167): craft\web\Request-&gt;_requestedSite(Object(craft\services\Sites))
  #2 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Request-&gt;init()
  #3 [internal function]: yii\base\BaseObject-&gt;__construct(Array)
  #4 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass-&gt;newInstanceArgs(Array)
  #5 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container-&gt;build('craft\\web\\Reque...', Array, Array)
  #6 /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container-&gt;get('craft\\web\\Reque...', Array, Array)
  #7 /storage/av05061/www/public_html/vendor/craftcms/cms/src/config/app.web.php(13): yii\BaseYii::createObject(Array)
  #8 [internal function]: {closure}()
  #9 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
  #10 /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container-&gt;invoke(Object(Closure), Array)
  #11 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
  #12 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator-&gt;get('request', true)
  #13 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Application.php(335): yii\base\Module-&gt;get('request', true)
  #14 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/ServiceLocator.php(74): craft\web\Application-&gt;get('request')
  #15 /storage/av05061/www/public_html/vendor/yiisoft/yii2/web/ErrorHandler.php(499): yii\di\ServiceLocator-&gt;__get('request')
  #16 /storage/av05061/www/public_html/vendor/yiisoft/yii2/web/ErrorHandler.php(115): yii\web\ErrorHandler-&gt;shouldRenderSimpleHtml()
  #17 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/ErrorHandler.php(132): yii\web\ErrorHandler-&gt;renderException(Object(yii\base\InvalidArgumentException))
  #18 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/ErrorHandler.php(111): craft\web\ErrorHandler-&gt;renderException(Object(yii\base\InvalidArgumentException))
  #19 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/ErrorHandler.php(63): yii\base\ErrorHandler-&gt;handleException(Object(yii\base\InvalidArgumentException))
  #20 [internal function]: craft\web\ErrorHandler-&gt;handleException(Object(yii\base\InvalidArgumentException))
  #21 {main}
  Previous exception:
  yii\base\InvalidArgumentException: Invalid path alias: @siteUrl/ in /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php:154
  Stack trace:
  #0 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Request.php(1080): yii\BaseYii::getAlias('@siteUrl/')
  #1 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Request.php(167): craft\web\Request-&gt;_requestedSite(Object(craft\services\Sites))
  #2 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Request-&gt;init()
  #3 [internal function]: yii\base\BaseObject-&gt;__construct(Array)
  #4 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass-&gt;newInstanceArgs(Array)
  #5 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container-&gt;build('craft\\web\\Reque...', Array, Array)
  #6 /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container-&gt;get('craft\\web\\Reque...', Array, Array)
  #7 /storage/av05061/www/public_html/vendor/craftcms/cms/src/config/app.web.php(13): yii\BaseYii::createObject(Array)
  #8 [internal function]: {closure}()
  #9 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
  #10 /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container-&gt;invoke(Object(Closure), Array)
  #11 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
  #12 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator-&gt;get('request', true)
  #13 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Application.php(335): yii\base\Module-&gt;get('request', true)
  #14 /storage/av05061/www/public_html/vendor/yiisoft/yii2/web/Application.php(160): craft\web\Application-&gt;get('request')
  #15 /storage/av05061/www/public_html/vendor/craftcms/cms/src/helpers/App.php(427): yii\web\Application-&gt;getRequest()
  #16 /storage/av05061/www/public_html/vendor/craftcms/cms/src/config/app.php(223): craft\helpers\App::logConfig()
  #17 [internal function]: {closure}()
  #18 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
  #19 /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container-&gt;invoke(Object(Closure), Array)
  #20 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
  #21 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator-&gt;get('log', true)
  #22 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Application.php(335): yii\base\Module-&gt;get('log', true)
  #23 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/Application.php(508): craft\web\Application-&gt;get('log')
  #24 /storage/av05061/www/public_html/vendor/craftcms/cms/src/base/ApplicationTrait.php(1133): yii\base\Application-&gt;getLog()
  #25 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Application.php(108): craft\web\Application-&gt;_preInit()
  #26 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Application-&gt;init()
  #27 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject-&gt;__construct(Array)
  #28 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Application.php(99): yii\base\Application-&gt;__construct(Array)
  #29 [internal function]: craft\web\Application-&gt;__construct(Array)
  #30 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass-&gt;newInstanceArgs(Array)
  #31 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container-&gt;build('craft\\web\\Appli...', Array, Array)
  #32 /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container-&gt;get('craft\\web\\Appli...', Array, Array)
  #33 /storage/av05061/www/public_html/vendor/craftcms/cms/bootstrap/bootstrap.php(252): yii\BaseYii::createObject(Array)
  #34 /storage/av05061/www/public_html/vendor/craftcms/cms/bootstrap/web.php(42): require('/storage/av0506...')
  #35 /storage/av05061/www/public_html/public/index.php(20): require('/storage/av0506...')
  #36 {main}```
  </code></pre>
  
Tags: <upgrades>
Title: Error while trying to upgrade to Craft 3
ThreadText: # Error while trying to upgrade to Craft 3
  
  (Asked by: username_0 on 2020-01-04)
  
  After following the instructions to upload, then upgrade alongside my installation of Craft 2, I first got a timeout error.
  
  I am now getting the following when trying to load any page, not just /admin - and can't see where siteUrl is defined anywhere to see where I could possibly change it.
  
  ```
  yii\base\InvalidArgumentException: Invalid path alias: @siteUrl/ in /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php:154
  Stack trace:
  #0 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Request.php(1080): yii\BaseYii::getAlias('@siteUrl/')
  #1 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Request.php(167): craft\web\Request->_requestedSite(Object(craft\services\Sites))
  #2 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Request->init()
  #3 [internal function]: yii\base\BaseObject->__construct(Array)
  #4 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass->newInstanceArgs(Array)
  #5 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('craft\\web\\Reque...', Array, Array)
  #6 /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('craft\\web\\Reque...', Array, Array)
  #7 /storage/av05061/www/public_html/vendor/craftcms/cms/src/config/app.web.php(13): yii\BaseYii::createObject(Array)
  #8 [internal function]: {closure}()
  #9 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
  #10 /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
  #11 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
  #12 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('request', true)
  #13 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Application.php(335): yii\base\Module->get('request', true)
  #14 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/ServiceLocator.php(74): craft\web\Application->get('request')
  #15 /storage/av05061/www/public_html/vendor/yiisoft/yii2/web/ErrorHandler.php(499): yii\di\ServiceLocator->__get('request')
  #16 /storage/av05061/www/public_html/vendor/yiisoft/yii2/web/ErrorHandler.php(115): yii\web\ErrorHandler->shouldRenderSimpleHtml()
  #17 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/ErrorHandler.php(132): yii\web\ErrorHandler->renderException(Object(yii\base\InvalidArgumentException))
  #18 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/ErrorHandler.php(111): craft\web\ErrorHandler->renderException(Object(yii\base\InvalidArgumentException))
  #19 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/ErrorHandler.php(63): yii\base\ErrorHandler->handleException(Object(yii\base\InvalidArgumentException))
  #20 [internal function]: craft\web\ErrorHandler->handleException(Object(yii\base\InvalidArgumentException))
  #21 {main}
  Previous exception:
  yii\base\InvalidArgumentException: Invalid path alias: @siteUrl/ in /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php:154
  Stack trace:
  #0 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Request.php(1080): yii\BaseYii::getAlias('@siteUrl/')
  #1 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Request.php(167): craft\web\Request->_requestedSite(Object(craft\services\Sites))
  #2 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Request->init()
  #3 [internal function]: yii\base\BaseObject->__construct(Array)
  #4 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass->newInstanceArgs(Array)
  #5 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('craft\\web\\Reque...', Array, Array)
  #6 /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('craft\\web\\Reque...', Array, Array)
  #7 /storage/av05061/www/public_html/vendor/craftcms/cms/src/config/app.web.php(13): yii\BaseYii::createObject(Array)
  #8 [internal function]: {closure}()
  #9 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
  #10 /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
  #11 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
  #12 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('request', true)
  #13 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Application.php(335): yii\base\Module->get('request', true)
  #14 /storage/av05061/www/public_html/vendor/yiisoft/yii2/web/Application.php(160): craft\web\Application->get('request')
  #15 /storage/av05061/www/public_html/vendor/craftcms/cms/src/helpers/App.php(427): yii\web\Application->getRequest()
  #16 /storage/av05061/www/public_html/vendor/craftcms/cms/src/config/app.php(223): craft\helpers\App::logConfig()
  #17 [internal function]: {closure}()
  #18 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
  #19 /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
  #20 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
  #21 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('log', true)
  #22 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Application.php(335): yii\base\Module->get('log', true)
  #23 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/Application.php(508): craft\web\Application->get('log')
  #24 /storage/av05061/www/public_html/vendor/craftcms/cms/src/base/ApplicationTrait.php(1133): yii\base\Application->getLog()
  #25 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Application.php(108): craft\web\Application->_preInit()
  #26 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Application->init()
  #27 /storage/av05061/www/public_html/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array)
  #28 /storage/av05061/www/public_html/vendor/craftcms/cms/src/web/Application.php(99): yii\base\Application->__construct(Array)
  #29 [internal function]: craft\web\Application->__construct(Array)
  #30 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass->newInstanceArgs(Array)
  #31 /storage/av05061/www/public_html/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('craft\\web\\Appli...', Array, Array)
  #32 /storage/av05061/www/public_html/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('craft\\web\\Appli...', Array, Array)
  #33 /storage/av05061/www/public_html/vendor/craftcms/cms/bootstrap/bootstrap.php(252): yii\BaseYii::createObject(Array)
  #34 /storage/av05061/www/public_html/vendor/craftcms/cms/bootstrap/web.php(42): require('/storage/av0506...')
  #35 /storage/av05061/www/public_html/public/index.php(20): require('/storage/av0506...')
  #36 {main}```
  
  ```
  
  **Tags:** upgrades
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-01-04. Score: 4
  
  You can add:
  
  ```
  'aliases' => [
      'siteUrl' => 'http://yoursiteurl.com',
  ],
  
  ```
  
  To your `config/general.php` or use:
  
  ```
  'aliases' => [
      'siteUrl' => getenv('DEFAULT_SITE_URL'),
  ],
  
  ```
  
  And define `DEFAULT_SITE_URL` in your `.env` file (better way).
  
  
  ---
  
  