Difference between revisions of "How to Create a Test Shop"

From Phoenix Cart User Guide
 
(43 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is optional but is recommended if you intend to modify your Phoenix.
+
<div class="btn btn-grey btn-back">{{#fas:arrow-left}} Back</div> <div class="btn btn-grey btn-download">{{#fas:download}} Download & Install</div>
 +
<hr>
  
This is basically installing another Phoenix where you can play, modify and test changes without any danger of breaking your Live Shop.
 
  
You can go further by creating two Test Shops.
+
Creating a Test Shop (sometimes referred to as a Staging Site) is not an essential step in setting up your shop but it is recommended and now is a good time to do it whilst the install procedure is fresh in your mind.
*Use one to test changes before applying them to your Live Shop - this Test Shop will then be kept up to date and be a mirror of your Live Shop.
 
*The other Test Shop can be kept as a Clean Install - any changes there are undone to keep it clean and box fresh.
 
  
A Test Shop can be created on your own computer but it is advisable to create one on your server where the environment will be exactly the same as your Live Shop so you know any changes will behave the same in both.
+
 
 +
----
 +
 
 +
 
 +
<BIG>'''INSTALL'''</BIG>
 +
 
 +
This is basically installing another CE Phoenix where you can play, modify and test changes without any danger of breaking your Live Shop.
 +
 
 +
You can go further by creating two '''Test Shops'''.
 +
*Use one to test changes before applying them to your '''Live Shop''', for example, to test an update - this '''Test Shop''' will then be kept up to date and be a mirror of your '''Live Shop'''.
 +
*The other '''Test Shop''' can be kept as a '''Clean Install''' - any changes there are undone to keep it clean and box fresh.
 +
 
 +
A '''Test Shop''' can be created on your own computer but it is advisable to create one on your server where the environment will be exactly the same as your Live Shop so you know any changes will behave the same in both.
 +
<div id="password protect"></div>
 +
Refer to <BIG>'''[[How to Install]]'''</BIG> for detailed instructions for installing Phoenix.
 
#Create a new database.
 
#Create a new database.
#Create a new folder/directory on your server and name it.
+
#Create a new folder/directory on your server and name it e.g. TestShop
 +
#Upload CE Phoenix to the new folder/directory.
 +
#Complete the install procedure.
 +
 
  
 +
<hr>
  
First task is to password protect the folder/directory to make sure the contents cannot be found by the public or internet search engines.
 
  
Create a new text file.
+
<BIG>'''PASSWORD PROTECT'''</BIG>
  
Open it and click save as - select All types (*.*) next to file type - type the filename .htaccess and click save.
+
'''Important''' - Immediately after installation:
  
Create another text file
+
*Password protect the folder/directory to make sure the contents cannot be found by the public or internet search engines.
  
Open it and click save as - select All types (*.*) next to file type - type the filename .htpasswd and click save.
+
This can be done in the control panel on some host servers or do it yourself.
  
Copy and paste the following code into the .htaccess file and save
+
#Edit the '''.htaccess''' file which will be in the folder/directory where you installed CE Phoenix on the server.
 +
#Copy and paste the following code at the bottom of the file - you need to replace '''/path/to/''' with the root path of your shop (this can be found in '''includes/configure.php''' in the line that starts with '''const DIR_FS_CATALOG''') and save.
 
<pre>
 
<pre>
 
AuthType Basic
 
AuthType Basic
Line 29: Line 45:
 
Require valid-user
 
Require valid-user
 
</pre>
 
</pre>
- you need to replace /path/to/ with the full path particular to your server.
+
#Create a new text file.
<pre>
+
#Open it and click '''Save as''' - select '''All types (*.*)''' next to file type - type the filename '''.htpasswd''' and click Save.
Below is a small PHP script that prints the full path to the directory it is placed in. Copy the code and paste it into a file called fullpath.php. You can then upload the file to the directory where you want to place the .htpasswd. Then point your browser to http://www.your-domain.com/path/to/fullpath.php
+
#Go to <BIG>https://www.htaccesstools.com/htpasswd-generator/</BIG>
</pre>
+
Follow the instructions there i.e. enter a username and password (save these) and it will generate some code similar to this example - don't use this example!
<pre>
+
<pre>Username:$apr1$OHIaiR2w$n6GlyntvlbKYE4.0veal1</pre>
<?php
+
#Copy and paste the code into the '''.htpasswd''' file and save.
$dir = dirname(__FILE__);
+
#Upload the file to the folder/directory.
echo "<p>Full path to this dir: " . $dir . "</p>";
 
echo "<p>Full path to a .htpasswd file in this dir: " . $dir . "/.htpasswd" . "</p>";
 
?>
 
</pre>
 
 
 
Go to <nowiki>https://www.htaccesstools.com/htpasswd-generator/</nowiki>
 
  
Follow the instructions there i.e. enter a username and password and it will generate some code similar to this example - don't use this example!
 
  
Username:$apr1$OHIaiR2w$n6GlyntvlbKYE4.0veal1.
+
When you next access the site you will see something like this to sign in:
  
Copy and paste the code into the .htpasswd file and save
+
[[File:signin.png]]
  
Create a new database.
 
  
Follow the instructions for installing Phoenix.
+
<hr>
 +
<span class="btn-grey">[[How_to_Update|&#129032; Previous Step]]</span>
 +
<span class="btn-grey">[[Set_up_Locality,_Date_Format_and_Currency|Next Step &#129034;]]</span>
 +
<hr>
 +
{{Contribute}}

Latest revision as of 05:05, 25 March 2021

Back
Download & Install


Creating a Test Shop (sometimes referred to as a Staging Site) is not an essential step in setting up your shop but it is recommended and now is a good time to do it whilst the install procedure is fresh in your mind.




INSTALL

This is basically installing another CE Phoenix where you can play, modify and test changes without any danger of breaking your Live Shop.

You can go further by creating two Test Shops.

  • Use one to test changes before applying them to your Live Shop, for example, to test an update - this Test Shop will then be kept up to date and be a mirror of your Live Shop.
  • The other Test Shop can be kept as a Clean Install - any changes there are undone to keep it clean and box fresh.

A Test Shop can be created on your own computer but it is advisable to create one on your server where the environment will be exactly the same as your Live Shop so you know any changes will behave the same in both.

Refer to How to Install for detailed instructions for installing Phoenix.

  1. Create a new database.
  2. Create a new folder/directory on your server and name it e.g. TestShop
  3. Upload CE Phoenix to the new folder/directory.
  4. Complete the install procedure.




PASSWORD PROTECT

Important - Immediately after installation:

  • Password protect the folder/directory to make sure the contents cannot be found by the public or internet search engines.

This can be done in the control panel on some host servers or do it yourself.

  1. Edit the .htaccess file which will be in the folder/directory where you installed CE Phoenix on the server.
  2. Copy and paste the following code at the bottom of the file - you need to replace /path/to/ with the root path of your shop (this can be found in includes/configure.php in the line that starts with const DIR_FS_CATALOG) and save.
AuthType Basic
AuthName "My Protected Area"
AuthUserFile /path/to/.htpasswd
Require valid-user
  1. Create a new text file.
  2. Open it and click Save as - select All types (*.*) next to file type - type the filename .htpasswd and click Save.
  3. Go to https://www.htaccesstools.com/htpasswd-generator/

Follow the instructions there i.e. enter a username and password (save these) and it will generate some code similar to this example - don't use this example!

Username:$apr1$OHIaiR2w$n6GlyntvlbKYE4.0veal1
  1. Copy and paste the code into the .htpasswd file and save.
  2. Upload the file to the folder/directory.


When you next access the site you will see something like this to sign in:

Signin.png



🠈 Previous Step Next Step 🠊


Phoenix Cart User Guide, like CE Phoenix Cart, is free to use but is maintained by unpaid volunteers.
If you have found it useful, please donate to the coffee pot!
Use this link to donate whatever you want.

Donate with Paypal

Code references are licensed under a Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales License.
All other content is the reserved Intellectual Property and Copyright of phoenixcart.org
PROTECTED BY COPYSCAPE ANTI-PLAGIARISM