Difference between revisions of "X-Cart:Blog system in X-Cart 4"

From X-Cart 4 Classic
Jump to: navigation, search
m (How to install WordPress in X-Cart)
m
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Overview==
 
==Overview==
WordPress in X-Cart is a product that extends your X-Cart store with a fully functional blog using the most popular blogging software in the world. Currently it is available in two forms:
+
'''Blog system in X-Cart 4''' (formerly known as "WordPress in X-Cart") is a product that extends your X-Cart store with a fully functional blog using the most popular blogging software in the world.
* for X-Cart versions 4.5.0 and later - as an installable module;
+
The add-on module allows you to add WordPress features to your existing X-Cart store.
* for X-Cart version 4.6.1 - as a bundle package.
 
The installable module allows you to add WordPress features to your existing X-Cart store; the bundle package allows you to install a new X-Cart store from scratch, and this new store will have WordPress in it from the very start.
 
  
==How to install WordPress in X-Cart==
+
==System requirements==
To install the WordPress in X-Cart bundle package:
+
To be able to successfully install and use the module "Blog system in X-Cart 4", you need a working copy of X-Cart version 4.5.0 or later installed on your server. Make sure that the version of the module is the same as the version of the installed copy of X-Cart.
# Download the distribution package from the File Area section of your {{QA}}. The file you need is named like '''x-cart-wordpress-x.y.z<i>edition</i>.tgz''', where '''x''', '''y''' and '''z''' are X-Cart version numbers and the '''<i>edition</i>''' portion of the filename is '''gold''' for the GOLD edition or '''goldplus''' for the GOLD PLUS edition. For example, if you need X-Cart v4.6.1 GOLD edition with WordPress, choose the file x-cart-wordpress-4.6.1gold.tgz.<br /><br />
+
{{Note1|Note: If you do not remember the version of the installed copy of X-Cart, you can find it in the <u>Environment info</u> section of the [[X-Cart:Summary_Page |Summary]] page in X-Cart Admin area.}}
# Unpack and install it as described in the manual at [[X-Cart:Installing_X-Cart_Using_the_Installation_Wizard|Installing X-Cart Using the Installation Wizard]]. When the X-Cart installation is complete, you will see this page:<br/>[[File:Wp_xc_01.png|border|640px]]<br />Click the '''Next''' button to proceed to WordPress installation.<br /><br />
+
 
# Select the directory where you want to install WordPress. Enter the directory name or leave the default value "'''blog'''".<br />[[File:Wp_xc_02.png|border|640px]]<br />Click the '''Next''' button.<br /><br />The installation script creates the directory and downloads WordPress package.<br/>[[File:Wp_xc_03.png|border|640px]]<br />{{Note1|'''Note''': This process may take 1-2 minutes.}}<br />{{Note1|'''Note''': If the directory cannot be created automatically, the following error message will be displayed:<br />[[File:Wp_xc_error_01.png|border|640px]]<br />In this case you can create it manually and reload the page in your browser to continue.}}<br />
+
==Installation==
# After the package has been downloaded, the confirmation message is displayed:<br />[[File:Wp_xc_04.png|border|640px]]<br />Click the '''Next''' button to continue.<br /><br />The installation script unpacks the WordPress files. After the process is completed, the link to the <u>WordPress installation script</u> will be displayed:<br/>[[File:Wp_xc_05.png|border|640px]]<br />Click on the link that looks like this: '''httр://&lt;<i>domain</i>&gt;/&lt;<i>directory</i>&gt;/wp-admin/setup-config.php'''.<br /><br />
+
To install the module:
# The WordPress page will be opened in a new tab:<br />[[File:Wp_xc_06.png|border|640px]]<br />On this page you should specify the MySQL details of your WordPress database.<br />{{Note1|'''Note''': For increased security, it is recommended to create a separate MySQL <u>user</u> and MySQL <u>database</u> for your WordPress.}}<br/>{{Note1|'''Note''': Do not use the same MySQL <i>user</i> for the two separate <i>databases</i> of your X-Cart and WordPress, because it will cause the database error "table doesn't exist". To resolve this issue, you can append a <i>port</i> number or <i>socket</i> to the MySQL <i>host</i> in the WordPress so that the host name differs from the one in your X-Cart by at least one character.}}<br />Click the '''Submit''' button to continue.<br /><br />
+
# Download the module distribution package from the File Area section of your {{QA}}. The distribution package is archived in the file '''wordpress-in-xcart-x.y.z.tgz''', where '''x''', '''y''' and '''z''' are the module version numbers. Make sure the version of the module matches the version of your installed copy of X-Cart.<br /><br />
 +
# Copy the distribution package to the X-Cart root directory on your server or hosting account.
 +
#* If you are using a Windows-based server, or a UNIX-based server without terminal access:
 +
#: a) Extract the contents of the archive with the module files to a directory on your system using your favorite compression program (WinZIP or any other archiver that supports TAR files).
 +
#: b) Use an FTP client to upload all the files extracted from the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
 +
#* If you are using a UNIX-based server with terminal access:
 +
#: a) Use an FTP client to upload the archive with the add-on module distribution package to the X-Cart root directory on your server or your hosting account.
 +
#: b) Decompress the package using the following command:
 +
#: <pre>tar -xzvf wordpress-in-xcart-x.y.z.tgz</pre>
 +
#: (Replace <u>x</u>, <u>y</u> and <u>z</u> with the actual version numbers).
 +
# In a web browser, run the installation script http://www.example.com/install-wordpress-in-xcart.php replacing the "www.example.com" with the actual domain name of your X-Cart store. This will start the installation wizard.
 +
# Carefully read the License agreement, enter the [[X-Cart:FAQs#What_is_Auth_code_and_where_can_I_find_it.3F|Auth code]] for your X-Cart installation into the Auth code field and select the "I accept the License Agreement" check box.
 +
# Click '''Next''' to continue. The installation process will start. The installer will make the necessary changes to your X-Cart installation, and the module will be activated.
 +
# Once the process is completed, click '''Next'''. This will open the next screen where you will be asked whether you wish a new system fingerprint to be generated.
 +
# Make your selection (Yes/No) and click '''Next'''. If you have chosen to generate a new system fingerprint, it will be generated. The process of generating a system fingerprint may take up as long as a few minutes. Once the generation process is completed, click '''Next'''. If you have chosen to skip the generation of a system fingerprint, you will be taken to the next step.
 +
# If you yet have to install WordPress, skip to next step. If you have WordPress already installed, enter the name of the directory where it is installed.<br />[[File:Wp_xc_select_dir.png|640px|border]]<br />Click '''Next'''. The installation script checks if WordPress exists in the directory you have specified and, if it is there, displays a confirmation message like the following:<br />[[File:Wp_xc_conf_msg.png|640px|border]]<br />Click '''Next''' to use the existing WordPress and complete the installation. Skip to the [[#ConfigureWordPress|configuring the WordPress]] step.
 +
# Select the directory where you want to install WordPress. Enter the directory name or leave the default value "'''blog'''".<br />[[File:Wp_xc_select_dir.png|640px|border]]<br />Click the '''Next''' button.<br /><br />The installation script creates the directory and downloads WordPress package.<br/>[[File:Wp_xc_03.png|border|640px]]<br />{{Note1|'''Note''': This process may take 1-2 minutes.}}
 +
# After the package has been downloaded, a confirmation message like the following is displayed:<br />[[File:Wp_xc_04.png|border|640px]]<br />Click '''Next''' to continue.<br /><br />The installation script unpacks the WordPress files. After the process is completed, the link to the <u>WordPress installation script</u> will be displayed:<br/>[[File:Wp_xc_05.png|border|640px]]<br />Click on the link that looks like this: '''httр://&lt;<i>domain</i>&gt;/&lt;<i>directory</i>&gt;/wp-admin/setup-config.php'''.<br /><br />
 +
# The WordPress page will be opened in a new tab:<br />[[File:Wp_xc_06.png|border|640px]]<br />On this page you should specify the MySQL details of your WordPress database.<br />{{Note1|'''Note''': For increased security, it is recommended to create a separate MySQL <u>user</u> and MySQL <u>database</u> for your WordPress.}}<br />Click '''Submit''' to continue.<br /><br />
 
# WordPress creates the '''wp-config.php''' file and writes the MySQL details into it. The confirmation message will be displayed as shown below:<br />[[File:Wp_xc_07.png|border|640px]]<br />Click '''Run the install''' to continue.<br/><br />If the '''wp-config.php''' file cannot be created automatically, you should create it manually in the directory of your WordPress and paste the content from the textarea into it:<br />[[File:Wp_xc_08.png|border|640px]]<br /><br />
 
# WordPress creates the '''wp-config.php''' file and writes the MySQL details into it. The confirmation message will be displayed as shown below:<br />[[File:Wp_xc_07.png|border|640px]]<br />Click '''Run the install''' to continue.<br/><br />If the '''wp-config.php''' file cannot be created automatically, you should create it manually in the directory of your WordPress and paste the content from the textarea into it:<br />[[File:Wp_xc_08.png|border|640px]]<br /><br />
 
# On the next page you should enter the ''title'' of your blog, the ''e-mail'' and ''password'' of your WordPress admin user:<br />[[File:Wp_xc_09.png|border|640px]]<br />Click the '''Install WordPress''' button.<br /><br />
 
# On the next page you should enter the ''title'' of your blog, the ''e-mail'' and ''password'' of your WordPress admin user:<br />[[File:Wp_xc_09.png|border|640px]]<br />Click the '''Install WordPress''' button.<br /><br />
 
# On the Success page click the <b>Log In</b> button to login to the WordPress admin area with the username and password entered on the previous page:<br />[[File:Wp_xc_10.png|border|640px]]<br /><br />
 
# On the Success page click the <b>Log In</b> button to login to the WordPress admin area with the username and password entered on the previous page:<br />[[File:Wp_xc_10.png|border|640px]]<br /><br />
# In the WordPress admin area, open the <u>Appearance</u> &gt; <u>Themes</u> section, find the '''Twenty Eleven for X-Cart''' theme and click on the <u>Activate</u> link under it:<br />[[File:Wp_xc_11.png|border|640px]]<br /><br />
+
# <div id="ConfigureWordPress"></div>In the WordPress admin area, open the <u>Appearance</u> &gt; <u>Themes</u> section, find the '''Twenty Eleven for X-Cart''' theme and click on the <u>Activate</u> link under it:<br />[[File:Wp_xc_11.png|border|640px]]<br /><br />
 
# Open the <u>Plugins</u> section, find the '''Integration with X-Cart''' plugin and click on the <u>Activate</u> link under it:<br />[[File:Wp_xc_12.png|border|640px]]<br /><br />
 
# Open the <u>Plugins</u> section, find the '''Integration with X-Cart''' plugin and click on the <u>Activate</u> link under it:<br />[[File:Wp_xc_12.png|border|640px]]<br /><br />
 
# In the X-Cart admin area, open the <u>Tools</u> &gt; <u>Maintenance</u> page, find the <u>Clear templates/X-Cart cache</u> section and click the '''Clear''' button.<br /><br />
 
# In the X-Cart admin area, open the <u>Tools</u> &gt; <u>Maintenance</u> page, find the <u>Clear templates/X-Cart cache</u> section and click the '''Clear''' button.<br /><br />
Line 32: Line 48:
 
Visit your blog page to make sure it is displayed correctly. For example, if the "Ideal Comfort" skin is used in your X-Cart, the blog should look like this:
 
Visit your blog page to make sure it is displayed correctly. For example, if the "Ideal Comfort" skin is used in your X-Cart, the blog should look like this:
 
:[[File:Wp_xc_13.png|border|640px]]
 
:[[File:Wp_xc_13.png|border|640px]]
 +
 +
==Uninstallation==
 +
Uninstallation permanently removes all the data related to the add-on module "Blog system in X-Cart 4" from your store.
 +
 +
To uninstall the module:
 +
# In a web browser, run the installation script http://www.example.com/install-wordpress-in-xcart.php replacing the "www.example.com" with the actual domain name of your X-Cart store. This will start the installation wizard.
 +
# At the first step of the uninstall process, select "Uninstall the module", enter the [[X-Cart:FAQs#What_is_Auth_code_and_where_can_I_find_it.3F|Auth code]] for your X-Cart installation into the Auth code field and select the "I accept the License Agreement" check box.
 +
# Click '''Next''' to continue. The uninstallation process will start.
 +
# Once the installation script has removed the files of the module "Blog system in X-Cart 4" and deactivated the module, click '''Next''' to complete the uninstallation.
 +
# Edit the '''.htaccess''' file in the X-Cart directory and remove the following lines from it:
 +
<pre>
 +
# WordPress in X-Cart [[[
 +
<IfModule mod_rewrite.c>
 +
RewriteEngine On
 +
RewriteBase /
 +
RewriteRule ^blog/index.php blog.php [L]
 +
RewriteCond %{REQUEST_FILENAME} !-f
 +
RewriteCond %{REQUEST_FILENAME} !-d
 +
RewriteRule ^blog/(.*) blog.php [L]
 +
</IfModule>
 +
# /WordPress in X-Cart ]]]
 +
</pre>
 +
 +
In the WordPress admin area, do the following:
 +
# Open the <u>Appearance</u> > <u>Themes page</u>. Choose one of the available themes and click on the <u>Activate</u> link next to it. Find the '''''Twenty Eleven for X-Cart''''' theme, click on the <u>Theme Details</u> link and then click on the <u>Delete</u> link.
 +
# Open the <u>Plugins</u> page. In the list of plugins find the '''''Integration with X-Cart''''' item, click on the <u>Deactivate</u> link next to it and then click on the <u>Delete</u> link next to it.
 +
 +
==Troubleshooting==
 +
'''Problem''': You attempt to open a blog page, but instead of the blog page your browser displays an error message like "This web page has a redirect loop" or "The page isn't redirecting properly".
 +
 +
'''Solution''': Check how your store URL and blog URL are configured.
 +
* If your store URL has the "www" prefix (e.g. http://www.example.com), then you should also add it to your blog URL (e.g. http://www.example.com/blog).
 +
* If your store URL does not have the "www" prefix (e.g. http://example.com), then you should also remove it from your blog URL (e.g. http://example.com/blog).
 +
In the WordPress admin area, go to Settings -> General. Find the two settings, "WordPress Address (URL)" and "Site Address (URL)", configure the addresses as described above and click "Save Changes".
 +
 +
[[Category:X-Cart modules]]

Latest revision as of 13:09, 11 November 2016

Overview

Blog system in X-Cart 4 (formerly known as "WordPress in X-Cart") is a product that extends your X-Cart store with a fully functional blog using the most popular blogging software in the world. The add-on module allows you to add WordPress features to your existing X-Cart store.

System requirements

To be able to successfully install and use the module "Blog system in X-Cart 4", you need a working copy of X-Cart version 4.5.0 or later installed on your server. Make sure that the version of the module is the same as the version of the installed copy of X-Cart.

Note: If you do not remember the version of the installed copy of X-Cart, you can find it in the Environment info section of the Summary page in X-Cart Admin area.

Installation

To install the module:

  1. Download the module distribution package from the File Area section of your X-Cart Account. The distribution package is archived in the file wordpress-in-xcart-x.y.z.tgz, where x, y and z are the module version numbers. Make sure the version of the module matches the version of your installed copy of X-Cart.

  2. Copy the distribution package to the X-Cart root directory on your server or hosting account.
    • If you are using a Windows-based server, or a UNIX-based server without terminal access:
    a) Extract the contents of the archive with the module files to a directory on your system using your favorite compression program (WinZIP or any other archiver that supports TAR files).
    b) Use an FTP client to upload all the files extracted from the archive (retaining the directory structure) to the X-Cart root directory on your server or your hosting account.
    • If you are using a UNIX-based server with terminal access:
    a) Use an FTP client to upload the archive with the add-on module distribution package to the X-Cart root directory on your server or your hosting account.
    b) Decompress the package using the following command:
    tar -xzvf wordpress-in-xcart-x.y.z.tgz
    (Replace x, y and z with the actual version numbers).
  3. In a web browser, run the installation script http://www.example.com/install-wordpress-in-xcart.php replacing the "www.example.com" with the actual domain name of your X-Cart store. This will start the installation wizard.
  4. Carefully read the License agreement, enter the Auth code for your X-Cart installation into the Auth code field and select the "I accept the License Agreement" check box.
  5. Click Next to continue. The installation process will start. The installer will make the necessary changes to your X-Cart installation, and the module will be activated.
  6. Once the process is completed, click Next. This will open the next screen where you will be asked whether you wish a new system fingerprint to be generated.
  7. Make your selection (Yes/No) and click Next. If you have chosen to generate a new system fingerprint, it will be generated. The process of generating a system fingerprint may take up as long as a few minutes. Once the generation process is completed, click Next. If you have chosen to skip the generation of a system fingerprint, you will be taken to the next step.
  8. If you yet have to install WordPress, skip to next step. If you have WordPress already installed, enter the name of the directory where it is installed.
    Wp xc select dir.png
    Click Next. The installation script checks if WordPress exists in the directory you have specified and, if it is there, displays a confirmation message like the following:
    Wp xc conf msg.png
    Click Next to use the existing WordPress and complete the installation. Skip to the configuring the WordPress step.
  9. Select the directory where you want to install WordPress. Enter the directory name or leave the default value "blog".
    Wp xc select dir.png
    Click the Next button.

    The installation script creates the directory and downloads WordPress package.
    Wp xc 03.png
    Note: This process may take 1-2 minutes.
  10. After the package has been downloaded, a confirmation message like the following is displayed:
    Wp xc 04.png
    Click Next to continue.

    The installation script unpacks the WordPress files. After the process is completed, the link to the WordPress installation script will be displayed:
    Wp xc 05.png
    Click on the link that looks like this: httр://<domain>/<directory>/wp-admin/setup-config.php.

  11. The WordPress page will be opened in a new tab:
    Wp xc 06.png
    On this page you should specify the MySQL details of your WordPress database.
    Note: For increased security, it is recommended to create a separate MySQL user and MySQL database for your WordPress.

    Click Submit to continue.

  12. WordPress creates the wp-config.php file and writes the MySQL details into it. The confirmation message will be displayed as shown below:
    Wp xc 07.png
    Click Run the install to continue.

    If the wp-config.php file cannot be created automatically, you should create it manually in the directory of your WordPress and paste the content from the textarea into it:
    Wp xc 08.png

  13. On the next page you should enter the title of your blog, the e-mail and password of your WordPress admin user:
    Wp xc 09.png
    Click the Install WordPress button.

  14. On the Success page click the Log In button to login to the WordPress admin area with the username and password entered on the previous page:
    Wp xc 10.png

  15. In the WordPress admin area, open the Appearance > Themes section, find the Twenty Eleven for X-Cart theme and click on the Activate link under it:
    Wp xc 11.png

  16. Open the Plugins section, find the Integration with X-Cart plugin and click on the Activate link under it:
    Wp xc 12.png

  17. In the X-Cart admin area, open the Tools > Maintenance page, find the Clear templates/X-Cart cache section and click the Clear button.

  18. If the .htaccess file cannot be updated automatically, the following warning message will be displayed by the installation script:
    Wp xc error 02.png
    You should copy the lines from this message, edit the .htaccess file in your X-Cart directory and insert the lines before the Clean URLs section:
# WordPress in X-Cart [[[
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^blog/index.php blog.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog/(.*) blog.php [L]
</IfModule>
# /WordPress in X-Cart ]]]


Visit your blog page to make sure it is displayed correctly. For example, if the "Ideal Comfort" skin is used in your X-Cart, the blog should look like this:

Wp xc 13.png

Uninstallation

Uninstallation permanently removes all the data related to the add-on module "Blog system in X-Cart 4" from your store.

To uninstall the module:

  1. In a web browser, run the installation script http://www.example.com/install-wordpress-in-xcart.php replacing the "www.example.com" with the actual domain name of your X-Cart store. This will start the installation wizard.
  2. At the first step of the uninstall process, select "Uninstall the module", enter the Auth code for your X-Cart installation into the Auth code field and select the "I accept the License Agreement" check box.
  3. Click Next to continue. The uninstallation process will start.
  4. Once the installation script has removed the files of the module "Blog system in X-Cart 4" and deactivated the module, click Next to complete the uninstallation.
  5. Edit the .htaccess file in the X-Cart directory and remove the following lines from it:
# WordPress in X-Cart [[[
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^blog/index.php blog.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog/(.*) blog.php [L]
</IfModule>
# /WordPress in X-Cart ]]]

In the WordPress admin area, do the following:

  1. Open the Appearance > Themes page. Choose one of the available themes and click on the Activate link next to it. Find the Twenty Eleven for X-Cart theme, click on the Theme Details link and then click on the Delete link.
  2. Open the Plugins page. In the list of plugins find the Integration with X-Cart item, click on the Deactivate link next to it and then click on the Delete link next to it.

Troubleshooting

Problem: You attempt to open a blog page, but instead of the blog page your browser displays an error message like "This web page has a redirect loop" or "The page isn't redirecting properly".

Solution: Check how your store URL and blog URL are configured.

In the WordPress admin area, go to Settings -> General. Find the two settings, "WordPress Address (URL)" and "Site Address (URL)", configure the addresses as described above and click "Save Changes".