Editing
Deploying a Site with Shared Resources
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== TODO Develop a workflow that incorporates GIT == * Would require SSH access to the production server. ** Sites hosted by NameCheap and GoDaddy have SSH access. ** Fall back on FTP uploads. == Site-specific files == *Make sure to upload <code>/_config/app_config.php </code> with development settings disabled. :This should be as simple as: <syntaxhighlight lang="php"> define ("IS_DEV", false); </syntaxhighlight> * Do a full backup of the existing site if making significant structural changes. ** Try to save the archive outside of the web directory on the server. ** With SSH access: <syntaxhighlight lang="bash"> tar -czvf [SITE_NAME]-[DATE_yymmdd].tar.gz file1 file2 dir1 dir2 ... </syntaxhighlight> ::* Creates a gzipped archive named <code>[SITE_NAME]-[DATE_yymmdd].tar.gz</code> from the files <code>file1 file2 dir1 dir2 ...</code> ::* <code>-c</code> create an archive ::* <code>-z</code> compress the archive ::* <code>-v</code> verbose mode ::* <code>-f</code> specifies the name of the archive file :* Without SSH access: :** Site cPanel > File Manager > select the files and directories to archive & compress :** Be aware that the cPanel File Manager usually imposes a size limit on the files being compressed and doesn't work well with a large amount of images. :* Always download the archive after creating it. * Copy local files to server. ** Collect files into a single archive and upload. ** With SSH access use command line to extract the files. ** Without SSH access use cPanel File Manager. * Permissions ** Until I research this more completely, I am settings permissions at `644` for files and `705` for directories. ** This is only an issue when uploading files and directories for the first time. *** '''Netbeans''' has a setting in ''site'' > ''source files'' > ''right click'' > '''Properties''' > '''Categories: Run Configuration''' > '''Preserve Remote File Permissions''' ** Some adjustment may need to be made for directories: *** Where images are uploaded (but `705` has worked fine for that so far). *** And for directories where the PHP pages deposit cache files. <syntaxhighlight lang="bash"> $ find ./ -type d -exec chmod 705 {} \; $ find ./ -type f -exec chmod 644 {} \; </syntaxhighlight> *TODO: Git workflow ==Shared files and libraries== *<code>[COMMON_LIB]_ajax/</code> >> <code>/_hostmgr/_ajax/</code> *<code>[COMMON_LIB]_classes/</code> >> <code>/_classes/</code> *<code>[COMMON_LIB]_lib/</code> >> <code>/_lib/</code><br>'''TODO''' This directory needs to be cleaned up. Possibly the subdirectory <code>error/</code> is the only one that needs to be uploaded. *<code>[COMMON_LIB]_templates/</code> >> <code>/_hostmgr/_templates/</code> *<code>[COMMON_LIB]hostmgr/sections/</code> >> <code>/_hostmgr/sections/</code> *<code>[COMMON_LIB]scripts/</code> >> <code>/scripts/</code> **<code>jquery/</code> **<code>littled/</code> ***JavaScript code should be copied from the minified JS library file to its corresponding <code>*-source.js</code> file. ***JavaScript code uploaded to server should be minified. ***Do not upload <code>*-source.js</code> files. *TODO: Git workflow ==Database== *Do a complete backup of the existing database before making any structural changes.<br />Naming convention <code>[SITE_NAME]-[DATEYYMMDD].sql</code> *Store all updates to database data and structure in local <code>_dbo/</code> directory. *Update production database using cPanel > phpMyAdmin [[Category:Project Documentation]] [[Category:CMS Documentation]] [[Category:Git]][[Category:Web Hosting]][[Category:Web Development]]
Summary:
Please note that all contributions to Littledamien Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Littledamien Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information