# WooCommerce Common Errors

When managing the Products on WooCommerce via LitCommerce, you may encounter some errors related to the WordPress connection or the WordPress Security Restrictions.

This article provides general troubleshooting steps to help address these issues.

## <mark style="color:$primary;">**Connection Instability**</mark>

You may encounter the following error message when creating the listings from the Sales Channel to WooCommerce.

<figure><img src="/files/cII1hyNHvEmNicSA4nyb" alt=""><figcaption></figcaption></figure>

This means the connection between LitCommerce and your WordPress site is not stable. It might be caused by the Maximum Execution Time and Memory Limit in your WordPress settings.

To optimize the connection between LitCommerce and WordPress, you can set these settings to 300 seconds and 256MB. Respectively using one of the following methods:

### <mark style="color:$info;">**1. Editing the php.ini File**</mark>

{% stepper %}
{% step %}
Locate the php.ini file (commonly found in the root folder or a directory like /etc/).

{% endstep %}

{% step %}
Open the file for editing and add or modify the following lines:

```
max_execution_time = 300 
memory_limit = 256M
```

* **max\_execution\_time:** Sets the maximum time (in seconds) a script is allowed to run.
* **memory\_limit:** Defines the maximum amount of memory a script can consume.

{% endstep %}

{% step %}
Save the file and reload the web server.
{% endstep %}
{% endstepper %}

### <mark style="color:$info;">**2. Modifying the .htaccess File (for Apache server only)**</mark>

{% stepper %}
{% step %}
Locate the .htaccess file and add the following lines:

```
php_value max_execution_time 300
php_value memory_limit 256M
```

{% endstep %}

{% step %}
Save the file and reload the webserver.
{% endstep %}
{% endstepper %}

### <mark style="color:$info;">**3. Updating wp-config.php**</mark>

{% stepper %}
{% step %}
Open the wp-config.php file.

{% endstep %}

{% step %}
Add these lines before the end of the file:

```
set_time_limit(300);
define('WP_MEMORY_LIMIT', '256M');
```

{% endstep %}

{% step %}
Save the file and reload the webserver.
{% endstep %}
{% endstepper %}

### <mark style="color:$info;">**4. Contacting your Hosting Provider**</mark>

If the above methods don’t work, contact your hosting provider and request the following adjustments:

* **Maximum Execution Time:** 300 seconds&#x20;
* **Memory Limit:** 256MB

## <mark style="color:$primary;">**WordPress Security Restrictions**</mark>

Typically, WordPress hosting providers automatically enable the Firewall on the user’s WordPress site. However, this security method may block actions performed through LitCommerce.

<figure><img src="/files/nqpkjkEMCdVlg1NCQ0uD" alt=""><figcaption></figcaption></figure>

To address, this, follow the steps below to add our IP addresses to the whitelist on WordPress:

{% stepper %}
{% step %}
Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and domain.

{% endstep %}

{% step %}
Go to **Security → WAF → Tools**.

{% endstep %}

{% step %}
Under IP Access Rules, enter the following details:

* For Value, enter all IP addresses of LitCommerce below:

**IPV4:**

72.14.177.223

96.126.114.141

45.33.27.6

45.79.34.198

50.116.21.133

**IPV6:**

2600:3c00::f03c:95ff:fe0a:5ecf

2600:3c00::f03c:92ff:feee:7fdf

2600:3c00::f03c:93ff:fe80:ade8

2600:3c00::f03c:93ff:fea9:2e9f

2600:3c00::f03c:93ff:fe37:d535

* Select `Allow`.

{% endstep %}

{% step %}
For Zone, select whether the rule applies to the current website only or all websites in the account.

{% endstep %}

{% step %}
(Optional) Enter a note for the rule (for example, Payment Gateway).

{% endstep %}

{% step %}
Select `Add`.
{% endstep %}
{% endstepper %}

<figure><img src="/files/WzNxPQ8y91e70UW127m5" alt=""><figcaption></figcaption></figure>

After completing the steps, your setup should allow LitCommerce requests through the firewall and look like this:

<figure><img src="/files/11jID2jYRut5MVQBFj2u" alt=""><figcaption></figcaption></figure>

For further information, follow [this article](https://developers.cloudflare.com/waf/tools/ip-access-rules/create/).

If the issue persists, contact our Support Team via the Chat Box in the bottom-right corner of our Help Center.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.litcommerce.com/marketplace-integration/supported-platforms/woocommerce/woocommerce-common-errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
