Skip to content

Instantly share code, notes, and snippets.

View renekreijveld's full-sized avatar

Rene Kreijveld renekreijveld

View GitHub Profile
#!/bin/sh
# jbackup -- Create a full backup (including database) of a Joomla website to .tgz file.
# Supports Joomla 1.0 - 3.3
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
# Warning! This script needs the file joomlafunctions. This has to be installed in the same directory as this script.
#!/bin/sh
# findjoomlas -- Find Joomla instances on your (DirectAdmin based) server.
# Supports Joomla versions 1.0/1.5/1.6/1.7/2.5/3.0/3.1/3.2/3.2
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
# Define variables
@renekreijveld
renekreijveld / gist:bef15b0045327c23e64894bcb48d3794
Created September 2, 2016 08:10
Repair non-working phpMyAdmin in MAMP PRO 4 for OSX
# Open Terminal on your Mac and do the following:
cd "/Library/Application Support/appsolute/MAMP PRO/phpMyAdmin"
cp -R /Applications/MAMP/bin/phpMyAdmin/* .
@renekreijveld
renekreijveld / jdbdump
Last active August 7, 2019 08:15
Dump a Joomla database to sql file.
#!/bin/sh
# jdbdump -- Dump a Joomla database to sql file.
#
# This scripts supports Joomla versions 1.0 - 3.3
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
@renekreijveld
renekreijveld / No WordPress urls allowd in Joomla
Created August 14, 2018 13:46
Add this code snippet to .htaccess of your Joomla website after RewriteEngine On
## Redirect WordPress attempts - BEGIN
Redirect 301 /wp-login.php http://127.0.0.1/wp-login.php
Redirect 301 /wp-admin.php http://127.0.0.1/wp-admin.php
RewriteRule ^wp-content(.*)$ http://127.0.0.1/$1 [L,R=301]
RewriteRule ^wp-admin(.*)$ http://127.0.0.1/$1 [L,R=301]
## Redirect WordPress attempts - END
@renekreijveld
renekreijveld / yearlist.php
Last active September 9, 2019 08:11
Custom form field to create a select list with year numbers
<?php
/**
* @version 1.0.0
* @author Rene Kreijveld <r.kreijveld@dsd.nl>
* @copyright 2019 DSD Business Internet
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
* Example form xml definition:
* <field name="established"
* type="yearlist"
@renekreijveld
renekreijveld / .bash_profile
Created April 23, 2020 07:19
Bash profile
HOST_NAME=macmini
shopt -s autocd
shopt -s histappend
export PATH=$PATH:$HOME/bin
export HISTSIZE=5000
export HISTFILESIZE=10000
@renekreijveld
renekreijveld / listupdates.php
Last active September 26, 2020 19:38
List extension updates
<?php
/**
* @package Joomla.Cli
*
* @copyright Copyright (C) 2016 Rene Kreijveld, All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/**
* This is a script which should be called from the command-line, not the web.
@renekreijveld
renekreijveld / jfindfiles
Last active March 11, 2021 07:03
Find unused and used content files in your Joomla website
#!/bin/sh
# jfindfiles -- Find used and unused content files in your Joomla website
#
# This scripts supports Joomla versions 2.5 - 3.x
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
@renekreijveld
renekreijveld / cleanjoomla
Last active August 26, 2021 07:03
Bash script to cleanup all Joomla files and folders
#!/bin/bash
# cleanjoomla -- Script to delete all Joomla files and folders
#
# This scripts supports Joomla versions 2.5 - 3.x
#
# Copyright 2021 Rene Kreijveld - email@renekreijveld.nl
# This program is free software; you may redistribute it and/or modify it.
#
# Version history