Log in to cPanel

First of all, you must log into your cPanel Account, and then open the File Manager:

In the “FILES” section, click the “File Manager” link or icon.

Locate the Drupal Settings File

Navigate to the Drupal settings.php file. In this case, Drupal is installed in a directory named Drupal, and the settings.php file can be found in  /sites/default.

Select the “settings.php” file and click “Edit.”

A file encoding popup will open. If your website uses English and standard characters, click the “Edit” button (if your site uses another language that does not use UTF-8 encoding, select the appropriate encoding and click the “Edit” button).

Make Your Temporary URL the Base URL in the Config File

Find the portion of the file that references the “Public file base URL.” Change this:

To this:

Click the “Save Changes” to complete the edit.

What we’ve done is remove the hash from the beginning of the line and replace the example URL in the file with our temporary URL. (Your temporary URL is the server IP address that can be found in your signup email followed by /~ and your account username. It looks like this: http://192.186.0.0/~ggexample/)

Edit the .htaccess file

By default the cPanel File Editor hides “dot” files, so to edit .htaccess, you must first configure the cPanel File Editor to display dot files.

In the File Manager, click the “Settings” button.

In the “Preferences popup window, check “Show Hidden Files” and click the “Save” button.

Open up the .htaccess file for editing in the same way you opened settings.php. Enter this line (replacing “cpanelusername” with your cPanel username):

RewriteBase /~cpanelusername

Click the “Save Changes” button.

That’s All There Is to It

Your Drupal installation should now be accessible using your temporary URL.

Make sure that you undo these changes when you have finished testing or point your domain to Impreza (to reverse the changes, just put a hash in front of the base URL line in settings.php and delete the line you added to .htaccess).

Impreza is a proud supporter of the Drupal community, and we support all the latest versions of Drupal, including Drupal 8.

Was this answer helpful? 0 Users Found This Useful (0 Votes)