Skip to content

muskmelon/Greemo

Repository files navigation

============= Configuration Database ============= 

$ mysql -uroot -p

1. make sure you have 'yhdsca1_wrdp2' user identify by 'SjWB8fVUPL[o' in the local mysql database.
    
    mysql$ CREATE USER 'yhdsca1_wrdp2'@'localhost' identified by 'SjWB8fVUPL[o';
    
2. make sure you have schema 'yhdsca1_wrdp2'

    mysql$ CREATE DATABASE yhdsca1_wrdp2;
    
3. make sure you grant all the privilege of 'yhdsca1_wrdp2' to 'yhdsca1_wrdp2' user 
    
    mysql$ GRANT ALL ON yhdsca1_wrdp2.* TO 'yhdsca1_wrdp2'@'localhost' identified by 'SjWB8fVUPL[o';

5. if to backup the schema

    $ mysqldump -h localhost -u root -p[root_password] yhdsca1_wrdp2 > path/to/yhdsca1_wrdp2.sql

6. if to backup certain tables in the schema

    $ mysqldump --add-drop-table -h localhost -u root -p[root_password] yhdsca1_wrdp2 (tablename tablename tablename) > path/to/yhdsca1_wrdp2.sql

7. if to restore backup schema (note that it's NOT inside the mysql console)
    
    $ mysql -h localhost -u root -p[root_password] yhdsca1_wrdp2 < path/to/yhdsca1_wrdp2.sql
    
    (if no password for root user)
    $ mysql -h localhost -u root -p yhdsca1_wrdp2 < path/to/yhdsca1_wrdp2.sql

refs:
http://codex.wordpress.org/Backing_Up_Your_Database#Using_WordPress_Database_Backup_Plugin


================= Git =================

1. Your local git's global setup

    $ git config --global user.name "Your Name"
    $ git config --global user.email myemail@whatever.com

2. Set up git AND add pub key: http://help.github.com/mac-set-up-git/

3. Connect local and repo:
    
    $ mkdir greemo
    $ cd greemo
    $ git init
    $ git remote add origin git@github.com:muskmelon/Greemo.git
    
4. Then you can do these now:
    
    $ git push -u origin master
    $ git pull -u origin master

5. Other useful Git commands:

    - remove file from git WITHOUT actually delete it (and yes put the filename to .gitignore to ignore it forever)
    ref: http://help.github.com/ignore-files/
    $ git rm --cached filename

6. if force to go back to a certain commit (undo)
    $ git reset --hard [commit id]

================= Apache =================

1. File Permission

check apache user of a local machine; in Leopard, Apache is already installed, and the httpd.conf file is
stored under /etc/apache2; check the file and search for 'User' in the config file.
in my case, my User is www and Group pis www as well,

It is happening quite often that when you try to do an update on plugin but Wordpress show up a FTP conection form instead, this often means that you don't have the 'write' permission for the directory which Wordpress try to access in. This results that every time when doing an upload or update or installation, you may need to grant permission to certain directories recursively OR change ownership recursively WHILE remembering to change everything back to prevent security leak. And obviously, doing this process repeating will get cumbersome. 

why this happens?
http://www.chrisabernethy.com/why-wordpress-asks-connection-info/
http://wordpress.org/support/topic/ftp-information-for-localhost?replies=4

- basic knowledge
user  group   everyone else
rwx   rwx     rwx           = 421 421 421 = 777

http://codex.wordpress.org/Changing_File_Permissions

so, for now every time I want to do an update, I change the ownership of the whole project to apache's user

$ sudo chown www greemo/ -R

and change it back again, works fine so far

$ sudo chown muskmelon greemo/ -R

About

source code for Greemo project website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published