This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.elementor-post__excerpt p:after{ | |
content: "..."; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("HTTP/1.1 301 Moved Permanently"); | |
header("Location: https://www.youtube.com/watch?v=dQw4w9WgXcQ"); | |
exit(); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add empty file: ssh | |
// add userconf.txt with default credentials: pi:raspberry | |
// put in boot | |
pi:$6$/4.VdYgDm7RJ0qM1$FwXCeQgDKkqrOU3RIRuDSKpauAbBvP11msq9X58c8Que2l1Dwq3vdJMgiZlQSbEXGaY5esVHGBNbCxKLVNqZW1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm --volumes-from wordpress -v $(pwd):/backup wordpress:latest tar zcvf /backup/wordpress-files-backup.tar.gz /var/www/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker exec wp_db mysqldump -uwp_databaseuser -p'wp_databasepassword' wordpress > wordpress-database-backup.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a local WordPress environment using Docker containers. | |
version: '3.8' | |
services: # Define each service. | |
wp_db: # Name of the service (MariaDB server to provide MySQL for a WordPress site). | |
container_name: wp_db # Give a name to the container. | |
image: mariadb:latest # The image that will be pulled and run as a container. | |
volumes: # Create storage on host machine for /var/lib/mysql. | |
- ./mysql:/var/lib/mysql # <host_filepath>:<container_filepath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS wp_users; | |
CREATE TABLE wp_users ( | |
ID bigint(20) unsigned NOT NULL auto_increment, | |
user_login varchar(60) NOT NULL default '', | |
user_pass varchar(64) NOT NULL default '', | |
user_nicename varchar(50) NOT NULL default '', | |
user_email varchar(100) NOT NULL default '', | |
user_url varchar(100) NOT NULL default '', | |
user_registered datetime NOT NULL default '0000-00-00 00:00:00', | |
user_activation_key varchar(60) NOT NULL default '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo mysql -u root | |
mysql> CREATE DATABASE wordpressdb; | |
mysql> CREATE USER wordpress@localhost IDENTIFIED BY '<your-password>'; | |
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER | |
-> ON wordpressdb.* | |
-> TO wordpress@localhost; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo a2enmod rewrite | |
sudo systemctl restart apache2 | |
sudo nano /etc/apache2/sites-available/000-default.conf | |
add: | |
<VirtualHost *:80> | |
<Directory /var/www/html> | |
Options Indexes FollowSymLinks | |
AllowOverride All |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<label for="framework"> |
NewerOlder