- Use local site "app" fodler as root for Laravel
- Create a .env file using info from Local site domain
- CLI Run php artisan key:generate
- CLI Run php artisan config:cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 📖 WP CLI Auto Completion | |
autoload bashcompinit | |
bashcompinit | |
source ~/wp-completion.bash | |
# 🏷️ System Paths | |
export PATH="$PATH:$HOME/.composer/vendor/bin" | |
export PATH="$PATH:$HOME/.config/composer/vendor/bin" | |
# ZSH Customization |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GZIP COMPRESSION | |
<IfModule mod_deflate.c> | |
# Compress HTML, CSS, JavaScript, Text, XML and fonts | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf | |
AddOutputFilterByType DEFLATE application/x-font-truetype |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_expires.c> | |
# Enable expirations | |
ExpiresActive On | |
# Default expiration: 1 hour after request | |
ExpiresDefault "now plus 1 hour" | |
# CSS and JS expiration: 1 week after request | |
ExpiresByType text/css "now plus 1 week" | |
ExpiresByType application/javascript "now plus 1 week" | |
ExpiresByType application/x-javascript "now plus 1 week" | |
# Image files expiration: 1 month after request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
DataTables JS: How to change pagination button class | |
Read More: http://www.lubus.in/blog/datatables-js-change-pagination-button-class | |
*/ | |
jQuery(document).ready(function($) { | |
// Initialize Datatables | |
$.fn.dataTable.ext.classes.sPageButton = 'button button-primary'; // Change Pagination Button Class | |
$('#lubus-wordcamp').DataTable( { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Generate a Link to Activate a Plugin in WordPress | |
*/ | |
$path = 'woocommerce/woocommerce.php'; | |
$link = wp_nonce_url(admin_url('plugins.php?action=activate&plugin='.$path), 'activate-plugin_'.$path); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* http://stackoverflow.com/questions/5327920/how-to-generate-a-wordpress-plugin-install-link | |
**/ | |
$action = 'install-plugin'; | |
$slug = 'akismet'; | |
wp_nonce_url( | |
add_query_arg( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Check the status of a plugin. | |
* | |
* @param string $location Base plugin path from plugins directory. | |
* @return int 1 if active; 2 if inactive; 0 if not installed | |
*/ | |
function get_plugin_status($location = '') { | |
if(is_plugin_active($location)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Facing HTTP Error on wordpress media upload on Godaddy / Shared Host ? This snippet might help you fix issue | |
* For more details about issue: http://www.lubus.in/blog/wordpress-media-upload-http-error-godaddy-shared-hosting-255 | |
**/ | |
/** Change graphic manuplation library used by wordpress **/ | |
add_filter( 'wp_image_editors', 'change_graphic_lib' ); |
NewerOlder