Knowledgebase

Viewing articles tagged 'developersgitdeployment'

A Developer's Monthly Routine Maintenance across the projects you look after.FOR EACH PROJECTApply available updates, having... A Developer's Post-Launch Checklist The first days after going live.IMMEDIATELYVerify the site loads from a different network and... A Developer's Pre-Launch Checklist Before a site goes live.TECHNICALPHP version current and supported Required extensions... A Simple Deployment Workflow Getting code from your machine to the server reliably.THE BASIC FLOWDevelop locally.Commit and... Application Security Checklist What to verify before a site goes live.INPUT AND OUTPUTAll database queries parameterised Output... Automating Deployment with Scripts Turning several steps into one command.WHAT A DEPLOYMENT SCRIPT DOESPulls the latest code... Blocking Bad Traffic at the Application Level Reducing load from requests you do not want.IDENTIFYING ITThe access log. Extracting and counting... Building an API on Shared Hosting Practical considerations.WHAT WORKSA PHP API using any framework, or none. This is ordinary web... Building and Consuming Webhooks Receiving notifications from other systems.WHAT A WEBHOOK ISAn external service calls a URL on... Caching Strategies for Developers Making an application fast.THE LAYERSOpcode caching: OPcache, which removes PHP recompilation.... Choosing a Stack for Your Project Matching the technology to the hosting.WHAT RUNS EASILY ON SHARED HOSTINGPHP applications of any... Common Developer Mistakes on Shared Hosting The ones that cause real problems.EDITING FILES DIRECTLY ON PRODUCTIONChanges exist nowhere else... Connecting to MySQL from the Command Line Direct database access over SSH.CONNECTINGUse the mysql client with your database username and... Continuous Deployment from a Repository Deploying automatically when code is pushed.HOW IT WORKSYour repository host runs a pipeline on... Creating a Staging Site on Your Hosting Testing on the server before production.WITH SOFTACULOUSFor WordPress, Softaculous >... Database Backups for Developers Protecting the data that cannot be regenerated.WHAT MAKES DATABASE BACKUPS DIFFERENTCode can be... Debugging Intermittent Problems Faults that do not reproduce on demand.WHY THEY ARE HARDYou cannot test a fix if you cannot... Debugging Techniques on Hosting Finding the cause when something fails.ENABLE ERROR LOGGINGNever display errors on a production... Deploying Without Downtime Avoiding a broken site during deployment.THE PROBLEMA deployment that copies files one at a time... Development Practices That Prevent Problems Habits that reduce the number of bad afternoons.VERSION CONTROL EVERYTHINGCode, configuration... Diagnosing 500 Errors The server reporting that something failed.THE FIRST PLACE TO LOOKcPanel > Metrics >... Diagnosing a White Screen No error, no content, nothing.WHAT IT MEANSPHP stopped and errors are not being displayed, which... Diagnosing Issues After a Migration The site worked before the move.THE COMMON CAUSESDatabase credentials not updated, or the cPanel... Editing Files from the Command Line Making changes without a file manager.THE EDITORSnano is simple. Controls are shown at the bottom... Essential Commands for Working on Hosting The small set that covers most tasks.MOVING AND LOOKINGpwd shows where you are ls -la lists files... Estimating and Scoping Development Work Where projects go wrong before any code is written.WHAT IS USUALLY UNDERESTIMATEDContent:... Getting Access to a Client's Hosting Safely Doing this properly protects both of you.WHAT TO ASK FORTheir own cPanel credentials, ideally... Getting Development Support from Us What we cover, and what is yours.WHAT WE HELP WITHServer configuration questions PHP versions and... Getting SSH Access on Your Hosting Account Command line access to your hosting.AVAILABILITYSSH access is available on many plans. Check your... Handing a Project Over to a Client Leaving a site someone else can maintain.WHAT TO PROVIDECredentials for everything, transferred... Handling Background Jobs and Queues Work that should not happen during a page load.WHY QUEUES EXISTSending email, processing images,... Handling Database Credentials Securely The most valuable secret in most applications.WHERE THEY BELONGIn environment configuration: a... Handling Errors Gracefully in Production What visitors see when something fails.THE RULESNever display technical errors to visitors. They... Handling File Uploads Securely One of the most exploited features in any application.THE RULESValidate the file type on the... Handling High Traffic on Shared Hosting Getting the most from a constrained environment.THE PRINCIPLEServe as many requests as possible... Handling Sessions and State Where user state lives.DEFAULT BEHAVIOURPHP stores session data in files on the server by... Implementing Caching in Your Application What to cache and how.THE CANDIDATESExpensive query results Rendered template fragments External... Importing and Exporting Databases Efficiently Moving data without timeouts.EXPORTINGmysqldump produces a SQL file containing structure and... Keeping Skills and Projects Current Maintenance that is not about any single site.WHAT GOES STALEPHP versions, which reach end of... Keeping Staging and Production in Step A staging environment only helps if it resembles production.WHAT MUST MATCHPHP version and... Laravel Deployment and Optimisation Getting a Laravel application running well.THE DEPLOYMENT SEQUENCEPull the code.Install... Logging in Your Application Recording what happened, usefully.WHAT TO LOGErrors and exceptions, with a stack traceSignificant... Maintaining Client Sites Ongoing work after launch.WHAT MAINTENANCE ACTUALLY INVOLVESApplying core, plugin and theme... Managing Database Changes Across Environments The hardest part of deployment.THE PROBLEMCode can be replaced wholesale. A database cannot,... Managing Database Size and Growth Databases grow, and growth causes problems.WHAT GROWSLog and audit tables Revisions, in content... Managing Dependencies Safely Third-party code is most of your application.THE PRINCIPLEEvery dependency is code you did not... Managing Environment Configuration Keeping settings out of your code.THE PRINCIPLECode is the same in every environment.... Managing Files and Archives Efficiently Command line file work that saves real time.UPLOADING A SITEZip it locally, upload the single... Managing Redirects at Scale When a site has hundreds of URL changes.WHEN THIS ARISESA redesign changing URL structure A... Migrating a Custom Application Moving something you built yourself.WHAT TO MOVEApplication code The database Uploaded files and... Migrating a Database Between Hosts Moving data without losing any.THE PROCEDUREExport the source database with mysqldump, or... Migrating Between PHP Versions Upgrading without breaking the site.BEFORE CHANGINGCheck your application's stated compatibility... Monitoring Application Performance Knowing how the site actually performs.WHAT TO MEASUREServer response time, which reflects your... Navigating Your Account from the Command Line Understanding the directory layout.YOUR HOME DIRECTORYWhere you land when you connect. It... Optimising Front-End Assets The part of performance visitors feel most.THE BASICSCompress and resize images before they are... Optimising Slow Queries Finding and fixing the queries that cost time.FINDING THEMThe slow query log records queries... Preparing a Project for Long-Term Maintenance Building something that survives you.WHAT MAKES A PROJECT MAINTAINABLEVersion control with... Profiling Slow Code Finding where time is actually spent.MEASURE BEFORE OPTIMISINGAssumptions about what is slow are... Reading and Fixing PHP Errors Interpreting what the log tells you.THE TYPESParse error: a syntax mistake. The file will not run... Reading Logs from the Command Line Finding what went wrong.WHERE THEY AREError and access logs are available in your home directory... Recovering a Site You Cannot Log Into Regaining access without the admin interface.FOR WORDPRESSWP-CLI creates a user, resets a... Reducing Database Queries Per Request The most common performance problem in web applications.THE CLASSIC MISTAKEA loop that queries... Reducing Memory Usage in Your Application Staying within limits.WHERE MEMORY GOESLoading large result sets into arrays Processing large... Rolling Back a Deployment Undoing a change that broke something.WITH GITChecking out the previous commit restores the... Running Laravel on Shared Hosting The framework works well here with correct setup.THE DOCUMENT ROOTPoint the domain's document... Running Long Tasks Without Losing Them Preventing a dropped connection killing a running job.THE PROBLEMA large database import, a long... Running Node.js Applications Where Node is available on hosting.CHECKING AVAILABILITYLook for Setup Node.js App in cPanel... Running Python Applications Django, Flask and similar on hosting.CHECKING AVAILABILITYLook for Setup Python App in cPanel. If... Scheduled Tasks Versus Real-Time Processing Deciding what happens when.DO IN THE REQUESTAnything the visitor needs the result of immediately:... Sending Email from Your Application Making sure application mail arrives.THE PROBLEM WITH DEFAULT SENDINGMost applications default to... Setting Up a Local Development Environment Working on your own machine.THE OPTIONSA packaged stack such as XAMPP, MAMP or Laragon, which... Setting Up cPanel Git Version Control The interface for Git without the command line.CREATING A REPOSITORYcPanel > Git Version... Setting Up Custom Error Pages What visitors see when something is not found.WHY BOTHERThe default server error page is bare,... Setting Up Hosting for a Client Doing it in a way that works when the relationship ends.THE OPTIONSThe client holds their own... Setting Up SSH Keys for Your Account More secure and more convenient than passwords.GENERATING A KEYIn cPanel > SSH Access >... Syncing a Database Between Environments Moving data safely in the right direction.THE SAFE DIRECTIONProduction to staging or local. This... Taking Over Someone Else's Project Inheriting code you did not write.BEFORE COMMITTINGLook at it first. Quote after you have seen... Testing Before You Deploy What to check, and how much.THE MINIMUM FOR ANY CHANGEThe page or feature you changed The... Testing Payment Integrations The part where mistakes cost money.USE TEST MODEEvery gateway provides test credentials and test... Troubleshooting Git Problems on Hosting When deployment does not work.PERMISSION DENIED ON CLONE OR PULLThe deploy key is not authorised,... Understanding Database Indexes The single most common performance fix.WHAT AN INDEX DOESLets the database find matching rows... Understanding File Permissions for Developers Getting them right so applications work and stay secure.THE STANDARD VALUESDirectories: 755Files:... Understanding Resource Limits as a Developer Working within a shared environment.THE LIMITSCPU time, memory, entry processes, and disk I/O,... URL Rewriting and Pretty URLs Making URLs readable and stable.WHY IT MATTERSReadable URLs are easier to share, better for... Using .htaccess Effectively The per-directory configuration file.WHAT IT CONTROLSURL rewriting Redirects Access restrictions... Using Composer on Shared Hosting Managing PHP dependencies.AVAILABILITYComposer is available on most accounts with SSH access.... Using Deploy Keys for Private Repositories Letting the server pull from a private repository.WHY A DEPLOY KEYA deploy key grants read access... Using Git on Your Hosting Account Version control on the server.AVAILABILITYGit is available on most accounts with SSH access.... Using phpMyAdmin Effectively The browser interface, used well.WHAT IT IS GOOD FORBrowsing data Running ad-hoc queries Small... Using the cPanel Terminal A shell without configuring anything locally.FINDING ITcPanel > Terminal, under Advanced. If... Using WP-CLI on Your Account Managing WordPress from the command line.WHYMany tasks are faster and more reliable than through... When a Deployment Breaks the Site Recovering quickly.FIRST, RESTORE SERVICERoll back. Check out the previous commit, or switch the... Working with a Team on One Hosting Account Several developers, one account.THE PROBLEMA single cPanel login shared between people means no... Working with APIs and External Services Calling other systems from your application.PRACTICAL RULESAlways set a timeout. An API call... Working with Cron Jobs as a Developer Scheduled tasks on hosting.CREATING ONEcPanel > Cron Jobs. Set the interval and the... Working with Multiple Databases Several applications, several databases.THE PRINCIPLEOne database and one database user per... Working with Subdomains for Applications Separating parts of a project.COMMON USESapi.yourdomain.com for an API app.yourdomain.com for an... Working with Support on a Technical Problem Getting a useful answer quickly.BEFORE OPENING A TICKETRead the error log and include what it... Writing Documentation Others Can Use The deliverable people value most and receive least.WHAT TO DOCUMENTHow to deploy How to run the... Writing Efficient Code for Shared Environments Habits that keep applications within limits.PRINCIPLESDo the minimum work per request Never do in... Writing Secure Database Queries Preventing the most damaging class of vulnerability.SQL INJECTIONNever build a query by...
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot