Difference between revisions of "Moving Storage Locations"

From WHMCS Documentation

(Create New Storage Locations)
Line 5: Line 5:
  
 
== Create New Storage Locations ==
 
== Create New Storage Locations ==
The first step is creating new storage locations. Create the ''attachments'' and ''downloads'' directories on the new server in the desired location (usually above the web-root).
+
First, you must create new storage locations:
  
Now login to the WHMCS Administration area and navigate to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > Storage Settings''' or, prior to WHMCS 8.0, '''Setup > Storage Settings'''.
+
# Create the ''attachments'' and ''downloads'' directories on the new server in the desired location.
 
+
# Log in to the WHMCS Admin Area.
=== Local Storage ===
+
# Go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > Storage Settings''' or, prior to WHMCS 8.0, '''Setup > Storage Settings'''.
#Click "Configuration" tab.
+
# Perform the steps for the desired location type:
#In "Add New Configuration" tile, choose "Local Storage" or and click "Add".
+
## For local storage locations:
#Enter path to the new storage location. The directory must exist and be writable. Click "Save".
+
### Select the '''Configuration''' tab.
#Repeat these steps as many times as required until all locations have been created.
+
### Under '''Add New Configuration''', choose ''Local Storage''.
 
+
### Click '''Add'''.
=== AWS S3 ===
+
### Enter path to the new storage location. The directory must exist and be writable.  
For AWS S3 locations, you should not need to move your storage locations. This is because their location has not changed.
+
### Click "Save".
 
+
## For AWS S3 locations:
You must ensure that your new server IP is updated in your S3 bucket security policy if this has changed and you have IP restrictions in place.
+
### You should not need to move storage locations because their location has not changed.
 +
### Make certain that you update your S3 bucket security policy with your new server IP address if you have IP address restrictions.
 +
# Repeat these steps as many times as required until all locations have been created.
  
 
== Migrate to new Storage Locations ==
 
== Migrate to new Storage Locations ==

Revision as of 20:09, 30 September 2021

When moving WHMCS, especially to a new server, it is very likely that your current storage locations will no longer be valid. It is important to update these immediately after moving WHMCS to ensure that your file storage and retrieval continues to function normally. Performing the following steps will allow you to update your locations to new, valid locations.

Create New Storage Locations

First, you must create new storage locations:

  1. Create the attachments and downloads directories on the new server in the desired location.
  2. Log in to the WHMCS Admin Area.
  3. Go to Configuration () > System Settings > Storage Settings or, prior to WHMCS 8.0, Setup > Storage Settings.
  4. Perform the steps for the desired location type:
    1. For local storage locations:
      1. Select the Configuration tab.
      2. Under Add New Configuration, choose Local Storage.
      3. Click Add.
      4. Enter path to the new storage location. The directory must exist and be writable.
      5. Click "Save".
    2. For AWS S3 locations:
      1. You should not need to move storage locations because their location has not changed.
      2. Make certain that you update your S3 bucket security policy with your new server IP address if you have IP address restrictions.
  5. Repeat these steps as many times as required until all locations have been created.

Migrate to new Storage Locations

  1. Click the "Settings" tab
  2. Using the dropdown provided, select your new storage location. 3 buttons will appear next to the dropdown.
  3. Select "Switch"
  4. Manually copy all files from the previous location to your newly selected location.

Why can't I select "Migrate"?
The previous storage location does not exist on the server to which WHMCS has been moved, so the files cannot be migrated automatically. For this reason, you must manually copy all files to the new location. By selecting "Switch", you are instructing WHMCS to switch the location without performing any automatic attempts to transfer files.