By marcom on Saturday, October 15, 2022
Export your database to create a backup using the following command:
$ mysqldump --opt --hex-blob [-h host] -u [user] -p [database] > [database].sql
Compress with gzip
You can also compress your database on-the-fly with gzip:
mysqldump --opt --hex-blob [-h host] -u [user] -p [database] | gzip -c > [database].sql.gz
To show progress, you can use pv:
By marcom on Thursday, December 2, 2021
Part of any website are the domains and URLs that users type in their browsers in order to reach a web page. However, it can be challenging to manage should it need to be changed. Thankfully, there are URL redirects for that.
URL redirect (forwarding) allows you to forward your domain visitors to any URL of your choice, either to a new domain or a different website altogether.
In an Apache web server, use the following rewrite rules in your .htaccess file.
By marcom on Thursday, November 11, 2021
Windows servers use .pfx files which contain the public key file (SSL certificate file) and the private key file. However, this can also be converted to .pem files to be used on Linux server using OpenSSL.
By marcom on Friday, May 14, 2021
- A Solr server running either on your local environment or on another server
Create a new Solr server
- Open your browser and login to your Drupal site
- Go to Configuration -> Search and metadata -> Search API
- Click the Add server button
- In the Add search server page, enter the following information
- Server name: Solr
- Backend: Solr
- Solr Connector: Standard
- Solr host: staging.upanupstudios.co
By marcom on Friday, May 14, 2021
Apache "Solr is the popular, blazing-fast, open source enterprise search platform built on Apache Lucene™." it is "highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites."
You can easily install Solr on your MacOS using homebrew.
By marcom on Wednesday, April 28, 2021
There is already basic article on upgrading Drupal 8 to Drupal 9, however, there is a bit more to consider, with my current setup of Drupal using composer.
By marcom on Thursday, March 18, 2021
In July of 2020, GitHub announced its intent to require the use of token-based authentication for all Git operation and on August 13, 2021, the password authentication will be deprecated. With SSH keys, you can connect to GitHub, including Drupal, without supplying your username and password each time you push or pull changes to or from the repo.
Follow the steps below to connect to GitHub and Drupal with SSH keys from your local environment.
By marcom on Monday, February 22, 2021
When installing a SSL certificate with a private key that is encrypted with a passphrase, you must decrypt the private key first. You can identify whether a private key is encrypted or not by opening the private key (.key or .pem file) using a text editor or command line. You should see the text ENCRYPTED if the private key is encrypted.
By marcom on Friday, January 22, 2021
- Open the terminal app (or the terminal in VS Code) and change to the root site directory of the site you are updating
- Switch to the main branch and fetch the latest changes
git checkout master
git fetch --all
- Create a new branch from the main branch for the Drupal core update
git checkout -b update/core-[version]