If you are using subdirectories on multisite
wp search-replace --network 'example.com' 'example.test' --all-tables --dry-run then
| ############ WordPress #################### | |
| # Disable logging for favicon and robots.txt | |
| location = /favicon.ico { | |
| try_files /favicon.ico @empty; | |
| access_log off; | |
| log_not_found off; | |
| expires max; | |
| } |
| <?xml version="1.0"?> | |
| <ruleset name="Ignacio"> | |
| <description>Security reviews with PHPCS.</description> | |
| <file>.</file> | |
| <!-- Exclude the Composer Vendor directory. --> | |
| <exclude-pattern>/vendor/*</exclude-pattern> | |
| <!-- Exclude the Node Modules directory. --> |
If you are using subdirectories on multisite
wp search-replace --network 'example.com' 'example.test' --all-tables --dry-run then
| { | |
| "name": "mcguffin/wp-package-security-check", | |
| "type": "wordpress-plugin", | |
| "license": "GPL-2.0-or-later", | |
| "homepage": "https://gist.github.com/mcguffin/255909d4d7fcc241fe63363012553268", | |
| "require": { | |
| "composer/installers": "~1.2" | |
| }, | |
| "require-dev": { | |
| "squizlabs/php_codesniffer": "*", |
| # - DISMISS PUBLIC ACCESS; ONLY ALLOW API ACCESS VIA OWN DOMAIN | |
| # - ALLOW ADMIN ACESS FOR ALL | |
| # | |
| # This example is in the "public_html/api/" folder where | |
| # the WP API is installed. | |
| # | |
| RewriteEngine On | |
| # If the referer is not its own domain | |
| RewriteCond %{HTTP_REFERER} !^http?://architectura.com [NC] | |
| # Then make it forbidden if not an admin login th |
| # phpstorm, webstorm | |
| .idea/ | |
| /.vscode | |
| /nbproject | |
| /node_modules | |
| # sublime and other ide | |
| .project | |
| *.sublime-project | |
| *.sublime-workspace |
| ## On you machine run: | |
| docker exec -it devkinsta_fpm bash | |
| ## After you are logged change to /tmp | |
| cd /tmp | |
| ## Install and configure composer | |
| php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
| php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
| php composer-setup.php |
| select | |
| p.ID as order_id, | |
| p.post_date, | |
| max( CASE WHEN pm.meta_key = '_billing_email' and p.ID = pm.post_id THEN pm.meta_value END ) as billing_email, | |
| max( CASE WHEN pm.meta_key = '_billing_first_name' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_first_name, | |
| max( CASE WHEN pm.meta_key = '_billing_last_name' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_last_name, | |
| max( CASE WHEN pm.meta_key = '_billing_address_1' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_address_1, | |
| max( CASE WHEN pm.meta_key = '_billing_address_2' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_address_2, | |
| max( CASE WHEN pm.meta_key = '_billing_city' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_city, | |
| max( CASE WHEN pm.meta_key = '_billing_state' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_state, |
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.
| #Go in your kinsta serv with ssh in terminal and make this two steps : | |
| #1: cat ~/.ssh/id_rsa.pub and copy paste in user setting in kinsta and SSH KEY | |
| #2: cat ~/.ssh/id_rsa and copy paste in secret SSH_KEY | |
| name: Deploy to Kinsta | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: |