- Download script
curl -fsSL https://gist.githubusercontent.com/EmranAhmed/a1a61b710f72317c775715fe1509e99d/raw/bootstrap.sh | bash -s
- Make it executable
chmod +x bootstrap.sh
./bootstrap.sh --domain=domain.com --user=myname
version: '3.7' | |
services: | |
mysql: | |
image: mariadb | |
ports: | |
- '3306' | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: wordpress | |
volumes: |
<?php | |
add_action( 'woocommerce_customer_save_address', 'jsforwp_update_address_for_orders', 10, 2 ); | |
function jsforwp_update_address_for_orders( $user_id ) { | |
$customer_meta = get_user_meta( $user_id ); | |
$customer_orders = get_posts( array( | |
'numberposts' => -1, | |
'meta_key' => '_customer_user', |
$url = 'https://www.youtube.com/watch?v=08f0tiLdk7w'; //a youtube video url | |
$autoembed = new WP_Embed(); //initialize the wordpress oEmbed helper class | |
$content = $autoembed->autoembed($url); //let's parse the url and get the embeded content |
<?php | |
/** | |
* WooCommerce template overriding class | |
* | |
* @author obiPlabon | |
*/ | |
class WC_Template_Override { | |
/** |
<?php | |
// enqueue these scripts and styles before admin_head | |
wp_enqueue_script( 'jquery-ui-dialog' ); // jquery and jquery-ui should be dependencies, didn't check though... | |
wp_enqueue_style( 'wp-jquery-ui-dialog' ); | |
?> | |
<!-- The modal / dialog box, hidden somewhere near the footer --> | |
<div id="my-dialog" class="hidden" style="max-width:800px"> | |
<h3>Dialog content</h3> | |
<p>This is some terribly exciting content inside this dialog. Don't you agree?</p> |
$wp_customize->add_setting( 'themeslug_media_setting_id', array( | |
'sanitize_callback' => 'absint', | |
'validate_callback' => 'themeslug_validate_image, | |
) ); | |
$wp_customize->add_control( | |
new WP_Customize_Media_Control( $wp_customize, 'themeslug_media_setting_id', array( | |
'label' => __( 'Custom Core Media Setting' ), | |
'section' => 'custom_section', // Add a default or your own section | |
'mime_type' => 'image', |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
<?php | |
add_theme_support( 'starter-content', array( | |
// Content Section for Widgets | |
'widgets' => array( | |
// Sidebar | |
'sidebar-1' => array( | |
// Widget ID | |
'my_text' => array( | |
// Widget $id -> set when creating a Widget Class |