Setting up Flarum on GoDaddy is roughly the same process, though there are a
few caveats that you will need to take into consideration.
Note: While the following process attempts to clarify some issues with GoDaddy
specifically, it does not cover setting up your GoDaddy account or cPanel, nor
will it cover domain registration or setting up DNS. That process is fairly
straight forward and GoDaddy's customer service can help you with any issues you
may have.
Before you continue, please ensure that the following bullet points are true.
- You can successfully log into your cPanel dashboard.
- You can successfully navigate to the domain you have purchased and/or
configured for this host. You should be able to navigate to the URL in your
browser and see the default GoDaddy landing page.
Once that is squared away, it's time to start installing Flarum.
Change the PHP Version
At the time of this writing, GoDaddy defaults to PHP 5.4. We'll need to change
this setting to enable us to install and run Flarum. To do this, open your
cPanel dashboard and scroll down to the "Software" section and click on "Select
PHP version". On the new page, select 5.5
from the drop-down menu and then
click on "Set as current".
Note: Changing the version here, only affects the version used by Apache. You
will still need to do the manual work-arounds below in order to get PHP 5.5 on
the command line.
Getting PHP 5.5 on the Command Line
Changing the version as outlined above does not update anything on the command
line. Here's how to fix that.
Open up your favorite SSH client (E.G. PuTTY, Terminal on Mac or Linux)
Here is where paths will diverge for a moment.
PuTTY
On Windows, you will likely be using PuTTY to connect. Enter your domain as the
host and your GoDaddy username as the user.
Note: If there is more than one user on the account, use the primary user's
username.
Then click connect.
Terminal
If you are on Mac or Linux, you will likely use Terminal to connect. Open a
terminal window and type ssh username@your.domain.com
where username is your
GoDaddy username.
Note: If there is more than one user on the account, use the primary user's
username.
Then press "Enter".
All Together Now!
When prompted for you password, enter the same password you would use to log
into GoDaddy and press "Enter".
Note: Make sure it's the password for the username you specified above.
Once you are logged in we can get started on setting up the php
command to use
PHP 5.5. Start by typing php -v
. If the version is anything other than 5.5
or higher, continue on. Otherwise, you can continue with the normal Flarum
installation process.
Finding PHP 5.5
It's out there somewhere...
Usually you can find the PHP 5.5 executable at /opt/alt/php55/usr/bin/php
. To
test that, run /opt/alt/php55/usr/bin/php -v
. This time you should see a
version number beginning with 5.5
. Lets tell Bash to use this executable for
php
.
Edit your .bash_profile by typing cd
followed by vim .bash_profile
. In that
file there is a line that says PATH=$PATH:$HOME/bin
. Change that line to say
PATH=$HOME/bin:$PATH
and save the file and exit.
Note: You can use whatever editor you like, it doesn't have to be vim
.
Next, type cd bin
followed by ln -s /opt/alt/php55/usr/bin/php
Exit your SSH session by typing exit
and re-connect.
Now when you run php -v
you should see version 5.5
or higher, which means
you can follow the normal Flarum Installation process.