| 63 | | That's it! |
| | 63 | This will create a site with a http://username.parrot.transitionnetwork.org/ address which is fine for developing the site, when it needs to be accessed from another domain name there are two steps to complete: |
| | 64 | |
| | 65 | === Adding a domain to a site === |
| | 66 | |
| | 67 | To do this edit the {{{/root/webarch/accounts/sites.txt}}} file and add the domain(s) as aliases and run {{{buildapache username}}}, there '''username''' is the username for the site, for example: |
| | 68 | |
| | 69 | {{{ |
| | 70 | sudo -i |
| | 71 | vim /root/webarch/accounts/sites.txt |
| | 72 | buildapache username |
| | 73 | }}} |
| | 74 | |
| | 75 | This is what the file looks like: |
| | 76 | |
| | 77 | {{{ |
| | 78 | # File format "username" "sites subdir" "ServerName" "ServerAliases" |
| | 79 | # note ServerAliases are comma delimited. |
| | 80 | # |
| | 81 | #Example |
| | 82 | #aed foo foo.example.com www.foo.example.com,foo.example.org |
| | 83 | movie default movie.parrot.webarch.net movie.parrot.transitionnetwork.org,intransitionmovie.com,www.intransitionmovie.com,intransitionmovie.org,www.intransitionmovie.org,transitionmovie.org,www.transitionmovie.org |
| | 84 | }}} |
| | 85 | |
| | 86 | See also http://webarch.net/docs/wsh#buildapache |
| | 87 | |
| | 88 | === Changing the default domain of a site === |
| | 89 | |
| | 90 | WordPress will redirect all requests to a single domain, this is set on the '''Settings -> General''' page at {{{/wp-admin/options-general.php}}} using the '''WordPress Address (URL)''' field. |
| | 91 | |
| | 92 | To change this address you need to add the following to {{{wp-config.php}}} after the "define" statements (just before the comment line that says "That's all, stop editing!"): |
| | 93 | |
| | 94 | {{{ |
| | 95 | define('RELOCATE',true); |
| | 96 | }}} |
| | 97 | |
| | 98 | Then update the DNS and visit the site at the correct URl, login and then remove the above from {{{wp-config.php}}}. For more information on this see https://codex.wordpress.org/Changing_The_Site_URL#Relocate_method |