- 1. Overview
- 2. Blank screen or 500 Internal Server Error at export
- 3. Increasing memory allocated to WordPress
- 4. The Export screen loads but is missing fields and/or elements including the Export button
- 5. How do I include Variations in my Product export?
- 6. Excel throws up a filename extension warning when opening XLS or XLSX exports
- 7. Turn off saving CSV files to WordPress Media Library (Uploads)
- 8. A WordPress or server error caused the exporter to fail, the exporter was provided with a reason: …
- 9. A fatal PHP error was encountered during the export process, we couldn’t detect or diagnose it further: PHP response …
- 10. Mitigating the risk of having the WordPress Media indexed by search engines (e.g. Google)
- 11. We have detected another e-Commerce Plugin than WP e-Commerce, please check that you are using Store Exporter for the correct platform.
- 12. Store Exporter Deluxe is activated but features are still locked.
- 13. Your PHP version (5.2) is not supported and is very much out of date…
- 14. Site hash mis-match after notice dismissal, ceasing current scheduled export
- 15. Store Exporter Deluxe is currently in debugging mode
- 16. Unable to edit or save export field changes on the Edit Export Template screen or the Quick Export screen just refreshes
The following sections detail specific troubleshooting advice for common problems and restrictions affecting Store Exporter Deluxe.
Here’s my internal troubleshooting process for resolving export issues affecting Store Exporter Deluxe, I recommend you consider using it before opening a Support ticket as more often than not the issue can be identified and resolved using these steps.
- Turn on extended logging mode within Store Exporter Deluxe
- Turn on WordPress error logging
- Turn on debug mode within Store Exporter Deluxe
- Open a Support ticket
Turn on extended logging mode within Store Exporter Deluxe
Store Exporter Deluxe supports an extended logging mode that logs the export process from start to finish to the WooCommerce logs directory in /wp-content/uploads/wc-logs/… This is very useful when Quick Exports are failing or Scheduled Exports are not completing or returning an error response under Recent Scheduled Exports.
There are two methods for turning on logging mode within Store Exporter Deluxe, we suggest you use the WordPress Administration method listed below.
Turning on extended logging mode via the WordPress Administration
- Within the WordPress Administration open up the WooCommerce > System Status screen
- Scroll down to the Store Exports section
- Click Turn on beside the WOO_CD_LOGGING row to enable extended logging within Store Exporter Deluxe
- If successful you will be redirected to the WooCommerce > Store Export > Settings and a notice indicating logging mode is enabled will be displayed
- Re-open the WooCommerce > System Status screen and check the WOO_CD_LOGGING row state
Turning on extended logging mode via functions.php
To turn on extended logging mode you need to add the following to your Theme’s functions.php file or the wp-config.php file in the base WordPress directory:
// This should be off by default in production environments define( 'WOO_CD_LOGGING', true );
Now that extended logging mode is turned on…
Now run a Quick Export or Scheduled Export to reproduce your issue.
When you are confident the Quick Export or Scheduled Export has failed open up the WooCommerce > System Status > Logs screen and from the dropdown list select the woo_ce… entry; WooCommerce stores log files in the /wp-content/uploads/wc-logs/… directory.
Open up the log file and scroll through the process, do you see any lines starting with Warning or Fatal error? That’s likely your culprit. If there’s nothing obvious then change to the fatal_errors entry in that same dropdown list. If there’s nothing there either jump over to the next section where we will turn on WordPress debug logging.
Turn on WordPress error logging
We do our best to capture the error responsible for failed exports within Store Exporter Deluxe but we can’t catch them all, turning on WordPress error logging is a sure way to capture all PHP notices, warnings and fatal errors being triggered during the export process and because of this helps immensely in debugging export issues. WordPress by default stores debugging information in /wp-content/debug.log
To turn on WordPress error logging you need to modify the wp-config.php file in the base WordPress directory:
/** * For developers: WordPress debugging mode. * * Change this to true to enable the display of notices during development. * It is strongly recommended that plugin and theme developers use WP_DEBUG * in their development environments. * * For information on other constants that can be used for debugging, * visit the Codex. * * @link https://codex.wordpress.org/Debugging_in_WordPress */ define( 'WP_DEBUG', false );
/** * For developers: WordPress debugging mode. * * Change this to true to enable the display of notices during development. * It is strongly recommended that plugin and theme developers use WP_DEBUG * in their development environments. * * For information on other constants that can be used for debugging, * visit the Codex. * * @link https://codex.wordpress.org/Debugging_in_WordPress */ // Enable WP_DEBUG mode define( 'WP_DEBUG', true ); // Enable Debug logging to the /wp-content/debug.log file define( 'WP_DEBUG_LOG', true ); // Disable display of errors and warnings define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 );
If you don’t see the above snippet with a line containing WP_DEBUG don’t stress, you can add the snippet in anywhere above the line containing:
/* That's all, stop editing! Happy blogging. */
Now run a Quick Export to reproduce your issue. When you are confident the Quick Export or Scheduled Export has failed open up /wp-content/debug.log with your preferred text editor and scroll through the process, please note that WordPress error logging records any and all PHP notices, warnings and fatal errors across your WordPress site so you may be overwhelmed with alot of information unrelated to the export. Do you see any lines starting with Warning or Fatal error around the time that the Quick Export or Scheduled Export was running? That’s likely your culprit.
Turn on debug mode within Store Exporter Deluxe
Store Exporter Deluxe supports a debug mode that will turn off the delivery of export files across the Plugin and instead return the contents of the export in-line within the Quick Export screen. This is helpful for confirming that the export contents are being correctly populated and confirming an issue with delivering the export file to the browser or other export method (e.g. Scheduled Exports support exporting to FTP/SFTP/FTPS servers as well as e-mailing, etc.). Please note turning on WOO_CD_DEBUG will disable the file generation of all Scheduled Exports until turned off.
To turn on debug mode you need to change line #25 of /wp-content/plugins/woocommerce-store-exporter-deluxe/exporter-deluxe.php from:
// Turn this on to enable additional debugging options at export time if( !defined( 'WOO_CD_DEBUG' ) ) define( 'WOO_CD_DEBUG', false );
// Turn this on to enable additional debugging options at export time if( !defined( 'WOO_CD_DEBUG' ) ) define( 'WOO_CD_DEBUG', true );
(I will change this to a WordPress Filter in a future Plugin release as Plugin changes like this are not pretty)
Blank screen or 500 Internal Server Error at export
This is a common export issue for large store catalogues (e.g. large number of Products, Orders, Coupons, etc.) or stores hosted on web servers with limited memory allocation. You will run an export and either be shown a blank screen, a 500 Internal Server Error or 404 Page Not Found error screen.
This issue occurs when the export process consumes all available memory and can occur during the following points in the export process:
- While WP_Query prepares a list of Post ID’s to return to the export process
- While we populate the export content with the Post ID’s given to us
- While PHPExcel or SimpleXML prepares the export file in the requested file format
This can be resolved by either seeing Increasing memory allocated to WordPress below or using the Limit Volume and Offset options under Export Options within our exporter.
The Limit Volume option when empty will default to exporting all the records of the requested export type. If after entering a value of 100 or 200 the export works then the above scenario can be confirmed. To workaround this memory limit use the Limit Volume and Offset values (e.g. 200, 400, 600, 800 for each consecutive export) then join the CSV with your preferred spreadsheet editor.
Note: We recommend store owners to use the Limit Volume and Volume Offset options under Export Options for exporting smaller datasets where the memory requirements cannot be increased on shared hosting environments.
Increasing memory allocated to WordPress
Error notices relevant to this section:
- Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0
- Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20480 bytes)…
Hosting providers tend to allocate hosting accounts RAM based on the subscription plan you have with them, the larger the plan the more RAM. WordPress on it’s own can run on these limited allocations but introducing e-Commerce and additional Plugins that have their own memory requirements can max out this allocation, the good news is this can often be increased, either on your own or with your hosting providers assistance.
[…] the WP_MEMORY_LIMIT option allows you to specify the maximum amount of memory that can be consumed by PHP. This setting may be necessary in the event you receive a message such as “Allowed memory size of xxxxxx bytes exhausted”.
This setting increases PHP Memory only for WordPress, not other applications. By default, WordPress will attempt to increase memory allocated to PHP to 32MB (code is at beginning of wp-settings.php), so the setting in wp-config.php should reflect something higher than 32MB.
Increase PHP Memory to 64MB – Recommended to export 250 Orders and above
define('WP_MEMORY_LIMIT', '64M'); define('WP_MAX_MEMORY_LIMIT', '64M');
Increase PHP Memory to 128MB – Recommended to export 500 Orders and above
define('WP_MEMORY_LIMIT', '128M'); define('WP_MAX_MEMORY_LIMIT', '128M');
Note: Since the Quick Export, Scheduled Export and CRON export engines within Store Exporter Deluxe exist within the WordPress Administration space the WP_MAX_MEMORY_LIMIT constant must be used as the WordPress Administration is limited to a maximum of 256M regardless of the value set in the WP_MEMORY_LIMIT constant.
This issue can happen due to the following common reasons:
- A fatal PHP error has been encountered which terminates the Export screen process
- A PHP timeout has been reached which terminates the Export screen process
- A PHP memory limit has been reached which terminates the Export screen process
If a fatal PHP error is encountered or PHP timeout/memory limit has been reached the Export screen process will be terminated by the server and the screen elements will cease rendering abruptly, to identify which is responsible you need to review the PHP error log. Unfortunately there is no simple way to determine which of the above cases is responsible without intermediate PHP skills; we’re happy to help diagnose this issue with you, please open a Support ticket with us.
How do I include Variations in my Product export?
By default Variations are not included in Product exports, this is an intentional act to prevent first time users with large Product catalogues running into fatal PHP errors after consuming all available memory allocated to WordPress. Enabling Variation Product exports is easy and remembered for future exports.
- Open WooCommerce > Store Export from the WordPress Administration menu
- Select the Quick Export tab
- Select the Product Export Type
- Scroll down to Export Filters
- Expand the Filter Products by Product Type filter
- Select all available Products Types (including Variations)
- Click Export/Export Products
To include Variations in Product exports managed as Scheduled Exports:
- Open WooCommerce > Store Export from the WordPress Administration menu
- Select the Scheduled Export tab
- Click New Scheduled Export to open the New Scheduled Export screen
- From the Export Type select Products
- Change to the Filters tab
- Under the Product Type option select all available Products Types (including Variations)
- Click Save/Update
Excel throws up a filename extension warning when opening XLS or XLSX exports
The file format and extension of “export_product-2014-08-09.xls” don’t match. The file could be corrupted or unsafe. Unless you trust its source, don’t open it. Do you want to open it anyway?
This common Excel issue can happen due to the following common reasons:
- when PHP warning notices are printed ahead of PHPExcel’s export file headers
- the NGINX Fast-CGI Cache corrupts export downloads on the Quick Export screen
PHP notices/warnings on production sites
The most common instance is where PHP warning notices are printed ahead of PHPExcel’s export file headers so what you’re really opening in Excel is our export file along with warning notices; this causes Excel to freak out. For plain-text export file types (e.g. CSV, TSV, XML) you can see the PHP warning message in the first row of the export file proceeded by the expected export contents. For compressed export file types (e.g. XLS, XLSX) you will not be able to view the Excel document as it is corrupted.
This issue can be resolved by either turning off the printing of PHP warning notices or opening your PHP error log and identifying what Plugin is generating error notices and isolating them.
You can turn off PHP warning notices within WordPress and have them stored to /wp-content/debug.log by editing your WordPress site’s wp-config.php file:View Code
NGINX Fast-CGI Cache
In the situation where NGINX Fast-CGI Cache is enabled for your hosting account and export downloads from the Quick Export screen are being corrupted you need to turn on Enable Archives from the Settings screen and download export files from the Archives tab.
Turn off saving CSV files to WordPress Media Library (Uploads)
By default Store Exporter saves export files to the WordPress Uploads directory (/wp-content/uploads/…) which populates the Archives screen and allows for the download of past exports. There is an option provided to disable this feature for data security reasons.
- Open the WordPress Administration
- Open the Store Export screen
- Switch to the Export screen
- Under the Export Options dialog set the “Delete temporary CSV after export” drop-down option to Yes
- Click Export to save changes
A WordPress or server error caused the exporter to fail, the exporter was provided with a reason: …
We could not create a temporary export file in … ensure that WordPress can read and write files here and try again.
This error notice tells us that PHP and WordPress could not generate a temporary file within the directory that Apache – via sys_get_temp_dir() – has been told to use for temporary files. This error notice can also happen when PHP Safe Mode (also known as ‘open_basedir’) has been enabled but the default PHP temporary directory has not been added to the allowed directory list.
To resolve this contact your hosting provider to find out the expected temporary files directory for your hosting server and ask that they allow read and write permissions to the default PHP temporary directory. If your hosting provider cannot supply read and write permission to the default PHP temporary directory it can be overriden within our Plugin.
Use the WordPress Filter ‘woo_ce_sys_get_temp_dir’ to override the default temporary file directory for our Plugin, you will also need to create a new PHP configuration value to inform PHPExcel of the new temporary directory.View Code
The server’s maximum execution time is too low to complete this export
You’ll see this notice when we detect that the export failed due to a server timeout or where the max_execution_time PHP configuration option is locked from changes by WordPress or it’s Plugins. The PHP option max_execution_time controls how long a process – for instance, Store Exporter Deluxe generating an export file – can run for, once a process hits the limit the process is terminated.
Before we start an export we do our best to increase this timeout to ensure that our process has enough time to build a complete export file. For sites where we are unable to increase this timeout limit users may see the following error notices:
- a blank screen
- 500 Internal Server Error
- Unable to serve this request
- 403 Forbidden, or
- Connection Timed Out
There are three solutions to this restriction:
- Increase the PHP option max_execution_time, you will need to contact your site administrator or hosting provider as there are several ways to do this task, and the best method depends on how your hosting server is configured. By default this is typically set to 30 seconds so if your Quick Export or Scheduled Export is failing at around the 30 second mark this is your culprit.
- If you’re hosted on a nginx environment increase the fcgi timeout value within your nginx configuration file.
- Use the batch export support included in Store Exporter Deluxe to create smaller exports that complete before you hit the above timeout limit. Use the Limit Volume and Volume Offset options to create smaller incremental exports.
Class ‘ZipArchive’ not found
You’ll see this notice when exporting either an XLS or XLSX file type and we detect that the ZipArchive Class is unavailable. The ZipArchive Class within PHPExcel is required for generating the OfficeOpenXML file format. This scenario happens when the ZipArchive has not been installed or has been disabled on the hosting server.
The most appropriate resolution to this issue is to contact your hosting provider. In the isolated case where the ZipArchive Class is unavailable you can override Store Exporter Deluxe to use an alternate PHP Class called PCLZip by adding the following WordPress Filter to your WordPress Theme’s functions.php file.View Code
A fatal PHP error was encountered during the export process, we couldn’t detect or diagnose it further: PHP response …
We do our very best to catch and resolve common PHP errors that are encountered during the export process but we can’t trap them all. If you get an error like the above contact us at Premium Support and include the error details so we can get this sorted.
Mitigating the risk of having the WordPress Media indexed by search engines (e.g. Google)
Directory browsing is typically disabled by default by your hosting provider but there are instances where this is not the case and your WordPress site can expose sensitive information about your Plugins and contents of the WordPress Media. The following tutorial by wpbeginner on how to disable directory browsing (off-site link) explains how to resolve this issue.
We have detected another e-Commerce Plugin than WP e-Commerce, please check that you are using Store Exporter for the correct platform.
Prior to adding Store Exporter Deluxe to the shopping cart of our website there is an option to choose which e-Commerce platform you intend to use our Plugin with, selecting the wrong platform (e.g. installing ‘Store Exporter Deluxe for WP e-Commerce’ on a WooCommerce store) will give you the above notice, don’t freak out though, just open a Premium Support ticket and provide your Order ID and we’ll update your Order and send you the latest release for the correct intended platform.
Store Exporter Deluxe is activated but features are still locked.
This happens when Store Exporter Deluxe is installed alongside an old copy of our basic Store Exporter. Simply de-activate the old copy of our basic Store Exporter and activate Store Exporter Deluxe. If you get stuck contact us at Premium Support.
Your PHP version (5.2) is not supported and is very much out of date…
In the 1.7.7 release of Store Exporter Deluxe we introduced an ‘anonymous function’, also known as a ‘closure’, support for closures were introduced in PHP 5.3 released way back in 2009, by comparison the latest release of PHP is 5.6 and was released in August of this year. Both PHP 5.2 and 5.3 are now unsupported and will not receive security updates.
We’ve added a workaround that only loads this functionality if PHP 5.3 is detected, what this means for pre-PHP 5.3 users is that the export field ordering will not save between screen refreshes. All users are urged by the authors of PHP to update legacy installs of PHP 5.2 to releases that are supported. Contact your hosting provider or network administrator to make this happen.
Site hash mis-match after notice dismissal, ceasing current scheduled export
Scheduled exports failing with the above error within the Recent Scheduled Export Dashboard widget? This means our duplicate-site/staging-site detection has triggered and requires input to continue exporting, to reset this flag open the following:
- Open WooCommerce > Store Export from the WordPress Administration
- Open the Settings tab
- Within the General Settings section click the View advanced settings link
- Click the Reset dismissed Store Export Deluxe notices link and confirm the prompt
- At the next screen load or scheduled export run you will see a notice similar to “It looks like this site has moved or is a duplicate site. Store Exporter Deluxe has disabled scheduled exports on this site to prevent duplicate scheduled exports being generated from a staging or test environment…“
- Click the Continue running scheduled exports button to acknowledge this notice and allow scheduled export
Store Exporter Deluxe is currently in debugging mode
Store Exporter Deluxe has several Constants set within the Plugin’s exporter-deluxe.php file that control the debug mode state as well as level of logging which can be very handy for debugging export issues and/or diagnosing Plugin conflicts. The available Constants include:
- WOO_CD_DEBUG: This is the primary debugging constant, when enabled no physical export files will be generated and comprehensive logging of export events will be saved to the WooCommerce logging system (WooCommerce > System Status > Logs > woo_ce…). By default this Constant has a false value.
- WOO_CD_LOGGING: This Constant state is set based on the above WOO_CD_DEBUG, it may be necessary to allow physical export files and have comprehensive logging which is why this Constant is separate to WOO_CD_DEBUG. By default this Constant has a false value.
Unable to edit or save export field changes on the Edit Export Template screen or the Quick Export screen just refreshes
PHP has a limit in the number of POST fields which can sent to the hosting server in a single submission, some hosts limit this to 1000. These available POST fields can quickly be consumed in WooCommerce stores having many Product Attributes populated in the Products, Orders and Customers export types as all export fields are shown in a single screen.
This issue can present itself in the following scenarios:
- Unable to save new Export Template changes
- Unable to save changes to existing Export Templates
- Running a Quick Export refreshes the screen without any warning or notice
The solution to this limitation is to request the PHP configuration option “max_input_vars” be increased from 1000 to 2000.
You can do this globally against all of your WordPress sites or on a per-site basis. Apply this change globally by editing your hosting server’s php.ini file.
max_input_vars = 2000
Alternative you can apply this on a per-site basis by adding the following to your WordPress site’s .htaccess file.
php_value max_input_vars 2000
That’s it. 🙂