If you have a slow import, or if you're running into a lot of server timeouts, then you can follow these steps to optimize your import.
Follow all of the steps listed here: http://www.wpallimport.com/documentation/troubleshooting/slow-imports/.
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
If you have a slow import, or if you're running into a lot of server timeouts, then you can follow these steps to optimize your import.
Follow all of the steps listed here: http://www.wpallimport.com/documentation/troubleshooting/slow-imports/.
XPath doesn't allow you to make queries with Cyrillic symbols unless you disable XML pre-processing by adding this code in your child themes functions.php file (or in a plugin like Code Snippets: https://wordpress.org/plugins/code-snippets/):
function wpai_is_xml_preprocess_enabled( $is_enabled ) {
return false;
}
add_filter( 'is_xml_preprocess_enabled', 'wpai_is_xml_preprocess_enabled', 10, 1 );
Once that code is in place, upload your file to an import and queries like this will be possible:
<?php | |
error_reporting(E_ALL); | |
$opts = getopt('f:d:rb:', ['ext:', 'php:', 'diff::']); | |
if ((int)isset($opts['d']) + (int)isset($opts['f']) !== 1) { | |
$self = basename(__FILE__); | |
echo <<<EOF | |
Usage: | |
php $self -f<php_script> [-b] [--php <path_to_php>] [ --diff [<file>]] |
<?php | |
/* | |
################### READ ME ################################# | |
You'll pass the URL to your feed/file to this function inside the "Download from URL" option when creating an import. | |
Image examples: https://d.pr/hCfNek and https://d.pr/MnerNb. | |
1. [custom_file_download("ftp://username:password@hostname.com/full/path/to/file.csv","csv")] | |
2. [custom_file_download("http://example.com/full/path/to/file.csv","csv")] |
When an image is imported, the name used in the media library is derived from the URL "basename". This can cause problems, especially when using the option "Search through the Media Library for existing images before importing new images". For example, even though they are different images, these URLs all have the same "basename" (in bold). They will generate the same file my-image.jpg
in the WordPress library:
http:// example.com/ my-image.jpg
http:// example.com/ my-image?id=1
http:// example.com/subfolder/ my-image.jpg
The solution is to put this PHP code in your function editor:
function fix_img_url($url){
It's not possible to append a row to an ACF repeater field without a custom code workaround that utilizes our API: http://www.wpallimport.com/documentation/developers/action-reference/.
The following is an example to show you how this can be done. You will almost certainly need to adjust the code snippet to make it work with your data/site.
Create a new "Manual Record Matching" import that updates the post(s): http://www.wpallimport.com/documentation/recurring/manual-record-matching/
Store the ACF data in your own dummy custom field: http://d.pr/i/3Si4ad.
# In your Jenkins job configuration, select "Add build step > Execute shell", and paste this script contents. | |
# Replace `______your-plugin-name______`, `______your-wp-username______` and `______your-wp-password______` as needed. | |
# main config | |
WP_ORG_USER="______your-wp-username______" # your WordPress.org username | |
WP_ORG_PASS="______your-wp-password______" # your WordPress.org password | |
PLUGINSLUG="______your-plugin-name______" | |
CURRENTDIR=`pwd` | |
MAINFILE="______your-plugin-name______.php" # this should be the name of your main php file in the wordpress plugin |
NOTICE: Booting Trusted Firmware | |
NOTICE: BL1: v1.3(debug):armada-17.06.2:297d68f | |
NOTICE: BL1: Built : 11:01:44, Jan 9 2NOTICE: BL2: v1.3(debug):armada-17.06.2:297d68f | |
NOTICE: BL2: Built : 11:01:47, Jan 9 2018NOTICE: BL31: v1.3(debug):armada-17.06.2:297d68f | |
NOTICE: BL31: | |
U-Boot 2017.03-armada-17.06.3-ga33ecb8-dirty (Jan 09 2018 - 10:56:45 -0200) | |
Model: Marvell Armada 3720 Community Board ESPRESSOBin | |
CPU @ 1000 [MHz] |
add_action( 'pmxi_saved_post', 'post_saved', 10, 1 ); | |
function post_saved( $id ) { | |
global $wpdb; | |
$pass = get_user_meta( $id, 'xfer_user_pass', true ); | |
$table = $wpdb->prefix . 'users'; | |
$wpdb->query( $wpdb->prepare( | |
" | |
UPDATE `" . $table . "` | |
SET `user_pass` = %s |