in case anyone was wondering, #TSA are my initials, hence #TSA_blogs #TSA_harmony #TSA_tech #TSA_ling #TSA_games
Since Bluehost cancelled my deal with them (an Alumni special from back when Bluehost was US owned and a proper company, before it's current gargantuan outsourced-everything state), I realized that I can use Mastodon as my blogging solution. Hence some long posts now and in the future. #TSA_Tech #blogs
Since Bluehost cancelled my deal with them (an Alumni special from back when Bluehost was US owned and a proper company, before it's current gargantuan outsourced-everything state), I realized that I can use Mastodon as my blogging solution. Hence some long posts now and in the future. #TSA_Tech #blogs
#TSA_tech # setting up a local version of Wordpress on Tumbleweed in 500 easy steps
For a better development experience I needed to set up Wordpress locally on my Tumbleweed machine, which was somewhat different than the Ubuntu that I brought the site from. It wasn't really 500 steps, but does have some gotchas and require some time to get right.
## Prerequisites
- Have a version of the WordPress site running somewhere on server that you can access. You need a mysqldump of its db and a copy of its complete file structure.
- `mysqldump -h host_if_not_local -P 3360 -uwordpressuser -p X > ~/X.sql`
- the port `-P` is whatever port it as served from, if not local and not default
- You will be prompted for the password of the user, which is the password from the wp-config of the site
- Have Apache, PHP, and MySQL or MariaDB running locally. You can find these in the repo with `sudo zypper search lamp`, which will show you the `lamp_server` pattern that you want. Install that.
## Install the site
1. Locate the base place that you are serving locally. Mine defaulted to `/srv/www/htdocs/`.
2. Source the database into your mysql, replacing X below with the name you want for your database.
1. `cd` to the directory with `thingyoudumped.sql`
2. log into the local db with `sql`. I had to be root to log in with the privileges I needed, so I started with `sudo -i`
3. create the db and create everything you need to fill, and the priveleges Wordpress will need. `CREATE USER 'X'@'localhost' IDENTIFIED BY 'X'; CREATE DATABASE X; GRANT ALL PRIVILEGES ON X.* to 'X';`
- Note the `@'localhost'`. In modern mysql, the old `@'*'` means everything EXCEPT localhost, so you won't work with the star.
4. from the mysql prompt, `/use X` and then run `source thingyoudumped.sql` and watch it bring in all the stuff you need
3. Copy your Wordpress directory, which should be the directory containing wp-config.php, into the served place, such as `/srv/www/htdocs/`.
4. Make sure the following lines are present in your wp-config.php, where X is the name of the actual directory containing the wp-config file:
define('WP_HOME','http://localhost/X');
define('WP_SITEURL','http://localhost/X');
Note the absence of `/` at the end of those http addresses. With a `/` at the end, I spent a while debugging why I was simply being routed to my base localhost directory and not the Wordpress site.
You will also need to make sure that wp-config contains working database credentials for the db you just created in step 2.3, unless you just copied the same credentials as the site had before.
## Making apache happy with .htaccess
In the same folder as your wp-config you should find a .htaccess file for the apache config that WordPress requires to make things work. It should contain something like this. My actual file had a massive section before this for WP-Rocket, but this is what is necessary.
` <IfModule mod_rewrite.c>`
` RewriteEngine On`
` RewriteBase /X/`
` RewriteRule ^index\.php$ - [L]`
` RewriteCond %{REQUEST_FILENAME} !-f`
` RewriteCond %{REQUEST_FILENAME} !-d`
` RewriteRule . /X/index.php [L]`
` </IfModule>`
## configuring apache itself with default.conf
This was the biggest difference from installing locally on Ubuntu. Apache on Tumbleweed uses a different directory structure. It doesn't have the `sites-enabled` or `sites-avalailable` directories, or the `a2ensite` family of helpers. Instead, the single location I need was `/etc/apache2/default-server.conf`, which I needed to adjust to respect the htaccess of our target directory. It had a bunch of other stuff in the file, but the following is the important part for WordPress:
` DocumentRoot "/srv/www/htdocs"`
` <Directory "/srv/www/htdocs">`
` Options All`
` AllowOverride All`
` <IfModule !mod_access_compat.c>`
` Require all granted`
` </IfModule>`
` <IfModule mod_access_compat.c>`
` Order allow,deny`
` Allow from all`
` </IfModule>`
` </Directory>`
` `
` <IfModule mod_userdir.c>`
` UserDir public_html`
` Include /etc/apache2/mod_userdir.conf`
` </IfModule>`
` `
` IncludeOptional /etc/apache2/conf.d/*.conf`
` `
` IncludeOptional /etc/apache2/conf.d/apache2-manual?conf`
` ServerName 127.0.0.1`
``
``
`## Success!`
`After this I was up and running. There might me another step about installing a php accellerator, but I didn't have to do that on this site. It should be available from the repo if you need it.
So this totally normal. WaPo reports that the EPA now says companies shouldn’t have to report planet-warming emissions
"The announcement amounts to a major rollback that would eliminate the primary means of tracking climate goals. The EPA framed it as a cost-cutting measure."
"The EPA said in a statement that ending the Greenhouse Gas Reporting Program would save American businesses up to $2.4 billion in regulatory costs. Under the EPA’s narrower interpretation of Clean Air Act requirements, some oil and natural gas facilities would still need to report their emissions starting in 2034."
"Environmental advocates say that data on what businesses are emitting is essential to tracking progress toward climate targets and effectively instituting regulations to tackle global warming."
From the archives:
The 3-Second Frontend Developer Test:
@civodul https://git.gammaspectra.live/git/go-away sounds promising, given the recent FSF proclamation about the unethical flavor of Anubis
Using Anubis on a static web site may be overkill (provided other things like rate limiting are in place); however, for the database-backed services we have in Guix, where each request can be expensive, I feel like we may have to use Anubis or similar at some point:
https://codeberg.org/guix/maintenance/issues/10
First release of mcp-toolkit (v0.1.1-alpha), a lib to build #MCP clients and MCP servers in #Clojure / #Clojurescript
Most notable features:
- #CLJC lib
- Supports async via Promesa
- Server API and client API
- Does not do cover the transport layer (yes, it's a feature)
Special kudos to Casey Link for contributing the HTTP/SSE example server 🙌
@jalefkowit such agree
@jalefkowit good job fixing stuff! Or should I have read "made the sandwich"?
yucky CSS on InstaGram #SecurityByObfuscation
html._9dls._ar44._8ykn.js-focus-visible._aa4c.__fb-light-mode body._ar45.system-fonts--body div#mount_0_0_ej div div div.x9f619.x1n2onr6.x1ja2u2z div.x78zum5.xdt5ytf.x1n2onr6.x1ja2u2z div.x78zum5.xdt5ytf.x1n2onr6.xat3117.xxzkxad div.x78zum5.xdt5ytf.x1t2pt76.x1n2onr6.x1ja2u2z.x10cihs4 div.x9f619.xvbhtw8.x78zum5.x15mokao.x1ga7v0g.x16uus16.xbiv7yw.x1d7yc3v.x1uhb9sk.x1plvlek.xryxfnj.x1c4vz4f.x2lah0s.x1q0g3np.xqjyukv.x1qjc9v5.x1oa3qoh.x1qughib div.x10o80wk.x14k21rp.xh8yej3.x8vgawa section.x78zum5.xdt5ytf.x1iyjqo2.xg6iff7 main.xvbhtw8.x78zum5.xdt5ytf.x1iyjqo2.xl56j7k div.x1iyjqo2.xdj266r.x11t971q.xvc5jky.x1yztbdb.x1ykew4q.xs9x0gt.x1xnnf8n.x18d9i69.x106a9eq.x19sv2k2.xt0jiz3.xzakr58.x1m1r3dp.xul9lc3.x1yj74s3 div.x6s0dn4.x78zum5.xdt5ytf.xdj266r.x11t971q.xat24cr.xvc5jky.x1n2onr6.xh8yej3 div.x1yvgwvq.xjd31um.x1ixjvfu.xwt6s21.x13fuv20.x18b5jzi.x1q0q8m5.x1t7ytsu.x178xt8z.x1lun4ml.xso031l.xpilrb4.x78zum5.x1q0g3np.xh8yej3 div.x6s0dn4.xjd31um.x18b5jzi.x1lun4ml.x78zum5.x1iyjqo2.x1tjbqro div.x1lliihq.xh8yej3 div div.x1qjc9v5.x972fbf.x10w94by.x1qhh985.x14e42zd.x9f619.x78zum5.xdt5ytf.x2lah0s.xk390pu.xdj266r.x14z9mp.xat24cr.x1lziwak.xexx8yu.xyri2b.x18d9i69.x1c1uobl.x1n2onr6.xggy1nq.x11njtxf div div.x1i10hfl div div.x1n2onr6 div.xyzq4qe.x5yr21d.x10l6tqk.xh8yej3 div.x1lliihq.x5yr21d.x1n2onr6.xh8yej3.x1ja2u2z div.x5yr21d.x1n2onr6.xh8yej3 div.x5yr21d.x1n2onr6.xh8yej3 div.x5yr21d.x1uhb9sk.xh8yej3 video.x1lliihq.x5yr21d.xh8yej3
Norway too has an election for parliament this year. In four months. As a small country, it may not matter that much to the rest of the world, but there are a couple of things that do.
1. We are an oil economy, and stopping the search for new exploitable oil resources is a continuous political struggle.
2. We have mineral resources, including on the ocean floor. Stopping ocean floor mineral extraction is even harder.
#gimp insight: to get layers as pages in the output PDF, you don't PRINT but instead EXPORT and the option will be there. What's the difference? I have no idea...
As i grow older i'm ever less impressed by tech and what it does. Especially for programming languages BUT since i worked a lot in #clojure i'm so excited about any task i do in it and with #babashka and #squint at hand you can just drop and use some lines of clojure anywhere its just amazing how coding could be if you have the right tools. I guess what i'm currently experiencing is "the joy of clojure". Thank you for anyone who makes the ecosystem and language comunity and language what it is. Professional and enterprisy but really exciting!
I'm not sure what mis-deed botched the job, but after D-Day and replacing my computer, my computer was left with a bunch of empty music directories. I had lost dozens of hours of ripping an converting to opus. Now I've got my music back with one short command. https://orys.us/wJ
Full Stack Clojure web app engineer