If you need a quick way to update your CSS without dealing with SCP every time, try one of these methods:

Instead of typing out the full command every time, use this one-liner to quickly upload just the CSS files:

shCopyEditscp -P 21098 "/home/mnrdjmke/public_html/wp-content/themes/swagdrip/dist/main.min.css" \
    "/home/mnrdjmke/public_html/wp-content/themes/swagdrip/dist/main.min.css.map" \
    mnrdjmke@198.54.125.196:/home/mnrdjmke/public_html/wp-content/themes/swagdrip/dist/

If you update all files in dist/, just use:

shCopyEditscp -P 21098 "/home/mnrdjmke/public_html/wp-content/themes/swagdrip/dist/"* \
    mnrdjmke@198.54.125.196:/home/mnrdjmke/public_html/wp-content/themes/swagdrip/dist/

๐Ÿ”ฅ Option 2: Create an Alias for SCP (Even Faster)

Set up an alias so you can update CSS with a single command like updatecss.

1๏ธโƒฃ Open your terminal and edit your ~/.zshrc (or ~/.bashrc if using Bash):

shCopyEditnano ~/.zshrc

2๏ธโƒฃ Add this line at the bottom:

shCopyEditalias updatecss='scp -P 21098 "/home/mnrdjmke/public_html/wp-content/themes/swagdrip/dist/"* mnrdjmke@198.54.125.196:/home/mnrdjmke/public_html/wp-content/themes/swagdrip/dist/'

3๏ธโƒฃ Save and exit (Ctrl + X, then Y, then Enter).

4๏ธโƒฃ Reload your terminal:

shCopyEditsource ~/.zshrc

Now, every time you need to update your CSS, just type:

shCopyEditupdatecss

๐Ÿš€ Done!


๐Ÿ”ฅ Option 3: Use SSHFS (Mount Remote Folder Locally)

If you frequently edit CSS, you can mount your remote WordPress theme folder as a local directory using SSHFS. This lets you edit files directly without needing SCP.

1๏ธโƒฃ Install SSHFS (if not installed):

shCopyEditbrew install sshfs

2๏ธโƒฃ Create a local folder to mount the remote swagdrip theme:

shCopyEditmkdir ~/mnt/wp-theme

3๏ธโƒฃ Mount the remote folder:

shCopyEditsshfs -p 21098 mnrdjmke@198.54.125.196:/home/mnrdjmke/public_html/wp-content/themes/swagdrip/ ~/mnt/wp-theme

Now, you can edit files directly in ~/mnt/wp-theme/dist/, and they will update on your site instantly. ๐Ÿš€

To unmount, run:

shCopyEditumount ~/mnt/wp-theme

๐Ÿ”ฅ Option 4: Force Browser Cache Refresh

If you’re updating CSS but not seeing changes, force reload the page:

  • Mac: Cmd + Shift + R
  • Windows/Linux: Ctrl + Shift + R

Or append a query string to your CSS file in WordPress to force browsers to reload it:

phpCopyEdit<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/dist/main.min.css?v=<?php echo time(); ?>">

๐Ÿ’ก Recap:

โœ… Quick SCP One-Liner โ†’ Copy files fast
โœ… Alias (updatecss) โ†’ Upload with one command
โœ… SSHFS (Mount Remote Theme Locally) โ†’ Edit files directly
โœ… Force Browser Cache Refresh โ†’ Avoid stale CSS

๐Ÿ”ฅ Pick what works best for you and make CSS updates lightning fast! ๐Ÿš€๐Ÿ’จ