Fix WordPress CORS Policy

I’ve had this error come up. “… has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.” To fix it, add this code to your .htaccess file: <FilesMatch “\.(php|ttf|ttc|otf|eot|woff|woff2|font.css)$”> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin “*” </IfModule> </FilesMatch>

Woocommerce – Delete Add to Cart

Add this code: remove_action(‘woocommerce_single_product_summary’,’woocommerce_template_single_add_to_cart’, 30 ); To your Functions.php file.

mysql Putty Commands

Log onto mysql: mysql -p mysql -u root -p Create a database: mysql> create database [database name]; Show all databases: mysql> show databases; Select database: mysql> use [database name] Show your database tables: mysql> show tables; Find database directory: mysql> select @@datadir; Create user: mysql> grant all privileges on [database name].* to ‘[username]’@’localhost’ identified by…

Read More

Common WordPress Problem Fixes

Permalinks to ‘Postname’ cause Page Not Found To fix, find your Apache httpd.conf file. Look for the code: LoadModule rewrite_module modules / If there a # (comment out) in front of the code above, remove the #. Save and restart your server.