Nichlas Brandon
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Dev vs Prod. Briefcase. Sync.Glad to be of assistance. 🙂
I think you have two options.
The not-so ideal but still viable option is that only one of you works on the site at a time, then uploads the changes, with no optimal way to share code and text changes with each other. You won’t be able to easily keep track of the changes the other person has made and vice versa.
So basically you’re just taking turns downloading the live site and uploading your local site when finished tweaking.
For this option, you just stick with the tools I’ve suggested.
The ideal option, however, is that you learn Git version control and then use whichever private git repository you prefer (BitBucket, GitHub, GitLab, etc.). I started with GitHub (most online tutorials seem to exist for this one as well) and later moved to GitLab.
It will probably be a lot easier if you learn this visually as opposed to just reading.
For this, when you have time to spare, I can suggest you activate a 1-week trial account with Team Treehouse and then take these two courses:
1.) Console Foundations (only if you’re new to using and navigating the command line interface)
2.) Git Basics
While I have taken Console Foundations, I have not taken the Git Basics course (yet). I started using Git through Carrie Dils and Mika Epstein’s great WordPress Development Workflow webinar course, supplemented with some reading and then took off from there. Their course also briefly covers DesktopServer and talks a little bit about Duplicator and WP Migrate DB Pro as well as other helpful tools.
If you’re going to use Git and you’re on a Windows operating system, you may consider installing Git for Windows so you can use the Git Bash command prompt. But do this after (unless instructed otherwise) the Treehouse Git course.
* Download Git for Windows
* Install Git for Windows using this guide (just the “How to install GIT on Windows” section)Once installed, look for the “Git Bash” executable and use this.
Forum: Themes and Templates
In reply to: Change width of the page contentGlad it worked!
Now, I’ll just suggest you make a quick change. Replace the code you’re using with this one instead:
/* Adjust Page Content Width */ @media (min-width: 769px) { .grid_16 { width: 100% !important; } }That should prevent the content from trailing off the edge on mobile devices.
Forum: Themes and Templates
In reply to: Change width of the page contentTest this one:
/* Adjust Page Content Width */ .grid_16 { width: 960px !important; }Repeat this as well each time you make a change:
Clean/purge any caching that may be installed on your site, and refresh the browser to check if the CSS change has been applied.
If the one above doesn’t work, try this one:
/* Adjust Page Content Width */ .container_24 .grid_16 { width: 960px !important; }If none of the above work, there may be an issue with your child theme or something else entirely.
To see if that is the case, you can install the Simple Custom CSS plugin and see if the changes work when using that. (Once plugin is installed, go to Appearance > Custom CSS and add the code.)
Forum: Themes and Templates
In reply to: Change width of the page contentIf your theme doesn’t already come with a fullwidth page template, you can add this to your custom CSS to occupy the extra space:
/* Adjust Page Content Width */ .grid_16 { width: 960px; }Remember to clean/purge any caching that may be installed on your site, and refresh the browser to check if the CSS change has been applied.
Forum: Fixing WordPress
In reply to: Dev vs Prod. Briefcase. Sync.Tools like that come in different flavors, certainly!
For your requirement specifications, using git with a repository like Bitbucket could be slightly overkill, unless there was someone besides yourself doing development work on the site also.
What I can recommend for you, is a combination of two or three WordPress-specific tools:
1.) DesktopServer by ServerPress (free version should suffice for your needs)
2.) Duplicator (free version should suffice for your needs)DesktopServer allows you to spin up fresh installations of WordPress on your local computer in seconds, using Blueprints (and you can create your own pre-configured blueprints). You can then carry out local testing and development work.
If you choose to use DesktopServer, I highly recommend you take the following Udemy course for a structured way of quickly getting comfortable using it in different ways: https://www.udemy.com/desktopserver
The Duplicator plugin allows you to create complete packages of a website, which you can use in two ways:
1.) You can create a package of your local development site, which you can upload to a website’s root content folder on a server, and then follow the necessary steps to install the site. (NOTE: the paid version of DesktopServer will allow you to deploy your local website directly up to a live website, essentially replacing the live website with your local website).
2.) Create a package of the live website, which you can then download to your local computer and import into DesktopServer.
The third tool I can recommend, if you think you’ll need it, is WP Migrate DB Pro.
This plugin essentially allows you to easily synchronize databases between sites. While Duplicator and DesktopServer are very efficient for replacing the entire site each time, WP Migrate DB Pro allows fine-grain control over which database tables—if not the entire database—that you want to quickly sync to and from a website. They also have an add-on that allows you to sync media library files as well.
This third option is helpful if you’re just making small tweaks that you want to quickly sync up to a live website.
There is a free version available called WP Migrate DB, but I’ve only used the pro version, so I can’t comment on how useful/limited it is in comparison.
Hope that helps.
Forum: Fixing WordPress
In reply to: giving my new website my old website urlHey Rhianne,
You’re welcome.
Definitely evaluate first if you can do it by yourself as it is an invaluable thing to know.
But if you don’t think you’ll be moving sites again any time soon and would like someone else to quickly do it for you this one time, then you can either find someone over at the WordPress jobs board or personally reach out to me via this contact form and I can help you get this taken care of.
Forum: Themes and Templates
In reply to: Css question with themeCheck if this produces the result you’re looking for:
/* Remove Homepage Page Title */ .home h1 { display: none; }Add the above to your custom CSS, then clear/purge any caching on your site and refresh your browser to check if the CSS code worked.
If it does work, you may consider looking for a more optimal solution from the theme developer, or you can just leave it like that.
Forum: Fixing WordPress
In reply to: Move old images to Media LibraryHey NullMind,
I’ve always used /wp-content/image.jpg for all my images on pages and posts, so there’s never been an issue for me when using WP-CLI. But if an absolute path is specified, then I’m not sure if WP-CLI will change the paths. In that case, you will need to find way to carry out a search-and-replace.
So, after running a full backup of your site:
1.) create a temporary directory
/var/www/example.com/public_html/temporary_folder
2.) Then move all your images to temporary_folder
3.) Now run the media import command:
wp media import /var/www/example.com/public_html/temporary_folder/*
4.) Optionally run the regenerate thumbnails command:
wp media regenerate –yes
5.) Test your website and see that everything is in order and whether or not there things you need to change.
Forum: Fixing WordPress
In reply to: giving my new website my old website urlThe following assumes you have (s)ftp and cPanel access to your live website’s directory. Don’t be afraid to get professional assistance if you feel hesitant with this method.
Before you get started, make a backup (and download it for safekeeping) of both websites. Then, on both of the sites, install the free Duplicator plugin.
Use this video as a guide to help you along using Duplicator: https://www.youtube.com/watch?v=hwId2F8LWEY
The main parts you want to pay attention to is when he creates the package, uploads the two files using (s)ftp to the live website’s root folder, and opens the Duplicator Installer page (www.example.com/installer.php) and applies changes.
Here are the steps that should take place starting on your NEW</strong site:
1.) VIDEO: follow along from 0:30 to 1:20
2.) In the root or public_html directory of your OLD site, locate the wp-config.php file. Inside this file, look for these three constants:
/** MySQL database name */ define('DB_NAME', 'RhiannenewlahndDatabase'); /** MySQL database username */ define('DB_USER', 'RhiannenewlahndUser'); /** MySQL database password */ define('DB_PASSWORD', 'HereIsThePassword');Copy just the database name, database username, and database password.
3.) Don’t skip the “Installer” tab like he suggests in the video. Open that tab and fill it out like this, using the details you got from the wp-config.php file.
4.) VIDEO: follow along from 1:25 to 4:30
5.) As an intermediary and isolated step, create a package of your OLD site, which you can use as a backup or to move it wherever you wish, using the same process you’re learning now.
5.) Follow along from 7:39 to 8:20
6.) In the video, you see “Create New Database” selected. Instead, choose “Connect and Remove All Data.”
7.) VIDEO: follow along from 8:21 to the end
You should now have rhiannenewlahnd.com/new moved to rhiannenewlahnd.com, while you have a Duplicator package of rhiannenewlahnd.com/ that you can move wherever you wish.
Excellent. Glad it worked out. 🙂
Forum: Themes and Templates
In reply to: Reducing size page title for small screensAll right.
I always forget to mention that you should purge/clear any caching system you may be using, and refresh your browser on the device you’re viewing the page from and then check again. That often does the trick.
If that still doesn’t change things, let me know if this works:
/* Change Page h1 Titles */ @media (max-width: 400px) { h1.page-title { font-size: 16px !important; } }After trying this one (and anytime you make CSS changes), also purge/clear caches and refresh browser.
You should be able to solve this by following any of the manual methods to changing your site’s stored URL from https to http.
Details can be found in this Codex article: https://codex.wordpress.org/Changing_The_Site_URL
Make sure there are no constants in your site’s wp-config.php file forcing or redirecting to https.
EDIT: Also, if you can possibly take a server-side backup of your site before you get started, that would be ideal as well.
Forum: Themes and Templates
In reply to: Reducing size page title for small screensHello!
Your CSS selector seems to be targeting h2 header tags, while the page titles are h1 tags. So try this instead:
/* Change Page h1 Titles */ @media (max-width:400px) { h1.page-title { font-size: 16px; } }Forum: Fixing WordPress
In reply to: Move old images to Media LibraryI can think of two options right now, but there may be other options.
First option (the hard way):
Manually download and then re-upload your images via the media library.
Second option (easy and quick way if you have the pre-requisites and know-how):
This option requires that you have shell and optionally (s)ftp access to your WP install on the host server, as well as the permissions to install software on the server (if WP CLI is not already available). This will usually be the case if you’re hosted on an unmanaged VPS, cloud instance or dedicated server.
You’ll move all your images into a new, temporary directory (folder) and then use the “WP-CLI” command-line tool to perform a media import from the temporary directory into your WordPress install’s uploads folder. Then you can optionally use WP-CLI to regenerate the image thumbnails as well.
This option has made importing hundreds or thousands of images into the media library a breeze.
Of course, backup your site before getting started.
If you’re able to give this a go, then just let me know and I can try and help you out.
Forum: Fixing WordPress
In reply to: Hosting trouble – how to approach resource limits on VPSDepending on which server stack and other software is running on the virtual machine (VM) itself, a chronic 3 GB memory utilization does seem a bit high to me considering just 6 WP installs with under 1000 total daily hits.
I think optimizing the WP sites and VM resource you already have is preferable to upgrading your plan, but without knowing more about your sites and server setup, it’s difficult to pinpoint where the problem, if any, might exist.