Difference between revisions of "Moving Storage Locations"

From WHMCS Documentation

(Create New Storage Locations)
Line 1: Line 1:
 
__TOC__
 
__TOC__
  
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.
+
When you move 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 ==
+
== Move to New Storage Locations ==
First, you must create new storage locations:
 
  
# Create the ''attachments'' and ''downloads'' directories on the new server in the desired location.
+
To complete this process, you will need to create new storage locations and then migrate your files to them.
# Log in to the WHMCS Admin Area.
+
 
# 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'''.
+
To do this:
 +
 
 +
# Create the ''attachments'' and ''downloads'' directories on the new server in the desired locations.
 +
# In the WHMCS Admin Area, 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'''.
 
# Perform the steps for the desired location type:
 
# Perform the steps for the desired location type:
## For local storage locations:
+
#* For local storage locations:
### Select the '''Configuration''' tab.
+
#*# Select the '''Configuration''' tab.
### Under '''Add New Configuration''', choose ''Local Storage''.  
+
#*# Under '''Add New Configuration''', choose ''Local Storage''.  
### Click '''Add'''.
+
#*# Click '''Add'''.
### Enter path to the new storage location. The directory must exist and be writable.  
+
#*# Enter path to the new storage location. The directory must exist and be writable.  
### Click "Save".
+
#*# Click "Save".
## For AWS S3 locations:
+
#* For AWS S3 locations, 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.
### You should not need to move storage locations because their location has not changed.
+
# Repeat these steps for each location until you have added all of the necessary locations.
### Make certain that you update your S3 bucket security policy with your new server IP address if you have IP address restrictions.
+
# Select the "Settings" tab.
# Repeat these steps as many times as required until all locations have been created.
+
# Select your new storage location from the menu.
 
+
# Click "Switch"
== Migrate to new Storage Locations ==
+
# Manually copy all files from the previous location to your newly-selected location.
#Click the "Settings" tab
 
#Using the dropdown provided, select your new storage location. 3 buttons will appear next to the dropdown.
 
#Select "Switch"
 
#Manually copy all files from the previous location to your newly selected location.
 
  
 
<div class="docs-alert-warning">
 
<div class="docs-alert-warning">
 
<span class="title">Why can't I select "Migrate"?</span><br />
 
<span class="title">Why can't I select "Migrate"?</span><br />
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.
+
Because the previous storage location does not exist on the server to which WHMCS has been moved, you cannot migrate the files automatically. For this reason, you must manually copy all files to the new location. Clicking '''Switch''' instructs WHMCS to switch the location without performing any automatic attempts to transfer files.
 
</div>
 
</div>

Revision as of 20:23, 21 January 2022

When you move 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.

Move to New Storage Locations

To complete this process, you will need to create new storage locations and then migrate your files to them.

To do this:

  1. Create the attachments and downloads directories on the new server in the desired locations.
  2. In the WHMCS Admin Area, go to Configuration () > System Settings > Storage Settings or, prior to WHMCS 8.0, Setup > Storage Settings.
  3. Perform the steps for the desired location type:
    • 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".
    • For AWS S3 locations, 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.
  4. Repeat these steps for each location until you have added all of the necessary locations.
  5. Select the "Settings" tab.
  6. Select your new storage location from the menu.
  7. Click "Switch"
  8. Manually copy all files from the previous location to your newly-selected location.

Why can't I select "Migrate"?
Because the previous storage location does not exist on the server to which WHMCS has been moved, you cannot migrate the files automatically. For this reason, you must manually copy all files to the new location. Clicking Switch instructs WHMCS to switch the location without performing any automatic attempts to transfer files.