Add Laravel as a sub directory

You can add laravel as the following :

Copy all the directories to the root of the file

Change the paths in the index.php you copied, you have folder called boostrap, change the start.php file and change the paths in this directory

you are done

you may face that you need to change the urls for the current css and js files, add asset() to before the path to get the full url to the home directory

Kind regards


Installing wordpress with one command

There is an issue that you may want to create a quick instantace of WordPress as test something, i’m using wp-cli to download a new wordpress core easily and fast, like wp core download

i wanted to created an alias and passing to it the parameter only for the database, like wpnew wordpressdev ,

this will create a new wordpress install with wordpressdev name and database wordpressdev and adding a the user and password from the command easily

here is the alias to use

alias wpnew='function install_wordpress(){ 
 mkdir $1;
 echo "created directory";
 cd $1;
 echo "moved to this directory";
 wp core download; 
 echo "Downloaded wordpress";
 /Applications/MAMP/Library/bin/mysql -uroot -proot -e "create database $1;"
 wp core config --dbname=$1 --dbuser=root --dbpass=root
 echo "created database";
 wp core install --url=http://localhost/$1 --title=wordpress --admin_user=admin --admin_password=admin
 echo "installed database";
 echo "finished, thanks OS OS";

Using phabricator


I need to rewrite this note again .


First we need to create a new repository, and when we add a new repo we have to add a new harbormaster, and then we need to add herald to connect between them .

then we use the following to add the respoistiry online

git add remote origin

and then push the files


Working with Git-ftp

I had a problem while working with my last project that, i hosting the website at a low costing company, and they don’t provide ssh or git on their servers .

Working with Git-ftp

i searched github and i found a repository called git-ftp, and this solve the problem in a nice way, let’s start wth working with a new project in our www directory

New project to start with

first we have to initialize git, using the following command
`git init`
the last command will install `.git` directory

Change the directory to .git directory and open the config file `nano .git/config` , then start to add the ftp login for our servers .

add the following line ( please note the comments )

        user = username  # username for the FTP 
        url = # the url for the destination directory
        password = PASSWORD  # the password for the FTP 

Then the next step to add the files need to be tracked, in the most cases you will need to track all the files with the following command .

git add * 

then you have to commit the changes, with the following command

git commit -a -m "this the message for the commit" 

Note that you will need to use those parameters -a , -m

then with the final step to upload the changed file to the hosting, with the following command

git ftp push 

Important notes:

  • Using the command git ftp push will upload all the files to the server, but in some cases i upload the files already with any other FTP client, then what i have to upload only is the .git-ftp.log file, in this case use the catchup command
  • it’s important to double check the destination of the files to not over write the added files, you can find them in .git/config file


Get the current screen ID from the admin panel

Every page in the admin panel has an screen id ( ), like the following :
Example : `edit-post` this the id of the post edit page

to get the screen id of the page `get_current_screen()`, this function return an array of the values with the url ( .