Site Tools


tech_public:webdev (text)

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tech_public:webdev [2024/12/17 07:34] jasonwchtech_public:webdev [2025/02/27 17:50] (current) – [Flarum migration] jasonwch
Line 27: Line 27:
 var FA6Json = {}; Object.keys(json).forEach(iconName => { const icon = json[iconName]; icon.styles.forEach(style => { if (!FA6Json[style]) { FA6Json[style] = []; } FA6Json[style].push(`fa-${style} fa-${iconName}`); }) }); require("fs").writeFile("{file-path}/FA6icons.json", JSON.stringify(FA6Json,null,2), () => {}); var FA6Json = {}; Object.keys(json).forEach(iconName => { const icon = json[iconName]; icon.styles.forEach(style => { if (!FA6Json[style]) { FA6Json[style] = []; } FA6Json[style].push(`fa-${style} fa-${iconName}`); }) }); require("fs").writeFile("{file-path}/FA6icons.json", JSON.stringify(FA6Json,null,2), () => {});
 </code> </code>
 +
 +===== Local Apache HTTPS SSL =====
 +
 +https://shaonmajumder.medium.com/secure-local-development-with-mkcert-a-step-by-step-guide-99e24317b305
 +
 +https://www.baeldung.com/linux/secure-sockets-layer-local-network
 +
 +https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-18-04
 +
 +https://medium.com/@pasanglamatamang/configuring-a-self-signed-ssl-certificate-on-a-apache-server-cbcd6eefdf1a
 +
 +===== Flarum migration =====
 +
 +https://discuss.flarum.org/d/5138-moving-flarum-install-between-servers/11
 +
 +**<fs x-large>Backup following elements</fs>**
 +  - Database \\ PhpMyAdmin \\ mysqldump -u mysql_user -p DATABASE_NAME > backup.sql
 +  - composer.json
 +  - composer.lock
 +  - config.php files,
 +  - extend.php for those who added any customizations,
 +  - assets directory.
 +
 +----
 +
 +**<fs x-large>Restore</fs>**
 +  - Install a bare flarum as per the instructions here without configuring it.
 +  - Copy over your composer.json and composer.lock files.
 +  - Run composer install --prefer-dist --no-dev
 +  - Copy over your config.php file.
 +  - Restore your database:
 +    - PhpMyAdmin 
 +    - b. mysql -u mysql_user -p DATABASE < backup.sql
 +  - Copy over your flarum-root/assets folder.
 +
 +----
 +
 +**<fs x-large>Reindex search (for chinese, <fc #ff0000>MySQL only, performance impact</fc>)</fs>**
 +
 +<code>
 +USE YourFlarumDataBaseName;
 +ALTER TABLE posts DROP INDEX content;
 +CREATE FULLTEXT INDEX content ON `posts` (`content`) WITH PARSER ngram;
 +</code>
 +
 +<code>
 +USE YourFlarumDataBaseName;
 +ALTER TABLE discussions DROP INDEX title;
 +CREATE FULLTEXT INDEX title ON `discussions` (`title`) WITH PARSER ngram;
 +</code>
 +
tech_public/webdev.1734392060.txt.gz · Last modified: by jasonwch (text)

Top ↑