Enabling and Configuration

In this section, we will show you how to setup OCWP after installation.

Link to the WordPress admin panel

The OCWP modification adds a new link to your OpenCart admin panel main menu: WordPress.

The link will be visible after you link OCWP with WordPress (explained later in this document), and after you give your admin panel user access permissions for module/ocwp. Here is how it will look like:


Link to the WordPress front-end

OCWP gives you the option to add a link to your blog in the front-end main menu of your OpenCart store. This can be done from Extensions > Modules > OCWP > Main Settings > Display link to WordPress blog in front-end main menu. Here is how it will look like:


For developersThe modified controller is catalog/controller/common/header.php - keep this in mind in case of unexpected clashes with other third-party modifications.

Linking OCWP with WordPress

After you finish with the initial installation of OCWP and visit the module page in Extensions > Modules > OCWP you will see the WordPress installation screen. OCWP will automatically search for existing WordPress installations in your OpenCart root folder. Depending on the results from this query, the welcome screen will look like one of two possible ways.

Scenario 1 - You have no existing WordPress blogs

In this case you will see the following screen:


The initial installation of WordPress cannot get simpler - you simply need to enter the name of your WordPress blog, the URL, your admin credentials and click Proceed.

NoteThe new WordPress installation will be placed in the following directory, relative to your OpenCart root directory: vendors/ocwp/wordpress/

The installation input fields are the following:

Option Name Option description
Site Title This will be the title and name of your WordPress installation. The URL of your blog. Default: http://your-domain/vendors/ocwp/wordpress
Site URL Note: If you change this value, you MUST set up an appropriate "rewrite" rule to point your URL to the folder vendors/ocwp/wordpress/. Change this value only if you know what you are doing.
Admin Username The username of your WordPress admin user. Use alphanumeric characters and underscore.
Admin Password The password of your WordPress admin user. Use characters, symbols and numbers. Must be at least 6 characters long.
Admin Email The e-mail of your WordPress admin user. Must be a valid email.
Send Email to your-OC-email Select this box if you want OCWP to send an email to your-OC-email with the configuration details you set here. Note: Keep this data safe from unwanted access.

If you wish to fine-tune your installation you can click the Show Advanced Options link. You will be presented with the following options:

Option Name Option description
Database Username Your database username. Defaults to your OpenCart database username.
Database Password Your database password. Defaults to your OpenCart database password.
Database Hostname Your database hostname. Defaults to your OpenCart database hostname.
Database Prefix Your database prefix. Must be different than your OpenCart prefix. Must contain alphanumeric characters. Underscore is also allowed
Database Name Your database name. Defaults to your OpenCart database name.

Scenario 2 - you already have an existing WordPress blog

In this case you are greeted with the following screen:


As you can see, OCWP has already traversed your OpenCart root folder and it has listed all existing WordPress installations. All you need to do is select the installation which you need to link and click Proceed.

OCWP plugins for WordPress

During the linking of OCWP with a WordPress installation, a few new WordPress plugins are installed in your WordPress:


OCWP Cache

This plugin clears OpenCart's OCWP cache on any POST requests made in WordPress (for example, whenever you click Save as an administrator). If you disable this, the content of the OpenCart OCWP widgets will not get automatically updated whenever you change WordPress content, meaning it will get served from the OpenCart cache if any exists.

OCWP Login/Logout

Provides an automatic WordPress admin panel login for admins who are already logged in OpenCart. Also, if you keep it enabled, whenever you logout of the WordPress admin panel, you will also be logged out of the OpenCart admin panel.

In order for this plugin to work for a specific user (for example john@ocwp.com), the following conditions must be met:

  1. john@ocwp.com must be an existing admin panel user in your WordPress blog;
  2. john@ocwp.com must be the e-mail of an existing admin panel user in your OpenCart store;
  3. In OpenCart john@ocwp.com must have access rights for the OpenCart path module/ocwp.

If you disable this plugin, automatic login into the WordPress admin panel from OCWP will no longer be possible.

Creating a backup of the WordPress database

OCWP allows you to create backups of your WordPress database directly from your OpenCart admin panel. This will be possible only if your OpenCart and WordPress are using the same database. If they are both configured with different databases, then you will not be able to do backups of the WordPress tables from the OpenCart admin panel.

To do a backup of the WordPress database tables, follow these steps:

  1. Go to Admin > Tools > Backup/Restore
  2. Select the following tables and click on the Backup icon on the top right:












Note{wp_table_prefix} stands for the prefix of your WordPress tables. In most cases this is oc_wp_, however it may be different depending on the settings you have chosen during the linking described in the Linking OCWP with WordPress section in this document.

The generated .SQL file can be used to restore your WordPress database. You can either insert it into PHPMyAdmin, or the OpenCart Backup/Restore form.