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/.
| <?php | |
| add_action( 'setted_transient', 'fix_wc_product_loop_transient', 50, 3 ); | |
| function fix_wc_product_loop_transient( $transient, $value, $expiration ){ | |
| $pos = strpos( $transient, 'wc_product_loop_' ); | |
| if ( $pos !== false && $expiration == 2592000 ) { | |
| set_transient( $transient, $value, DAY_IN_SECONDS ); | |
| } | |
| } |
| #!/bin/bash | |
| # | |
| # woo-customer-email.sh | |
| # | |
| wp user list | gawk ' | |
| BEGIN { | |
| FS = OFS = "\t"; | |
| } |
| #!/bin/bash | |
| # | |
| # woo-order-email.sh | |
| # | |
| wp db dump - --tables=$(wp db prefix)postmeta \ | |
| --skip-extended-insert | gawk ' | |
| /ing_email/ { | |
| gsub(".[)];.*$", ""); |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteCond %{REQUEST_URI} ^/(wp-content/uploads/20[0-9][0-9]/.*)$ | |
| RewriteRule ^(.*) https://prod-domain.tld/%1 [L,R=302] | |
| </IfModule> |
| #!/bin/bash | |
| # | |
| # ide kerül => /etc/cron.weekly/callsign-weekly | |
| # | |
| export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin | |
| OD=/netpub/wwwroot/breko.hu/callsign | |
| OF=call_sign_book.csv |
| #!/usr/bin/env bash | |
| # for debug output, uncomment: | |
| #set -x | |
| function help { | |
| echo "WordPress cleanup -v 0.5 2018-06-26 / peeter@zone.ee | |
| Usage: |
| <?php | |
| if (!defined('ABSPATH')) { | |
| exit; | |
| } | |
| class CC_WC_Orders_Controller | |
| { | |
| public function Init() | |
| { |
| function remove_category( $string, $type ) { | |
| if ( $type != 'single' && $type == 'category' && ( strpos( $string, 'category' ) !== false ) ) { | |
| $url_without_category = str_replace( "/category/", "/", $string ); | |
| return trailingslashit( $url_without_category ); | |
| } | |
| return $string; | |
| } | |
| add_filter( 'user_trailingslashit', 'remove_category', 100, 2); |
| BEGIN { | |
| FS = "\t"; | |
| getline; | |
| } | |
| /[/]images[/]/ { | |
| next; | |
| } |
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/.