N
N
Nik_10112020-06-16 04:51:32
WordPress
Nik_1011, 2020-06-16 04:51:32

How to properly and safely edit a WordPress theme that is already hosted?

Hello!

Question: how to properly and safely edit a WordPress theme that is already hosted?

What I mean: created a theme locally, transferred the files to the hosting via FileZilla, uploaded the database, replaced the old urls with the hosting url, everything works. For example, the client writes I want to add a section, change the image in the header, add a carousel to display instagram posts.

Well, there is FileZilla and access to hosting, you can do all this through the code editor. But, on the current hosting, it is undesirable to do this, something suddenly flies off, and there the buyers look at the site.

How to act in this situation? Download the entire site and edit the necessary files locally, and then upload back to the hosting? Please explain the algorithm, because how to do it safely and what files to back up is not yet clear. Yes, there is a child theme, but this is not a reserve.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Orkhan Hasanli, 2020-06-16
@azerphoenix

You can do this through the code editor.

In no case in production should you edit through the code editor! Especially in cases where there is no access to ftp. Since one mistake in PHP and the site will fall. You will have to connect to FTP (Filezilla) and edit the site from there.
the client writes I want to add a section, change the image in the header, add a carousel to display instagram posts.

Of course, you can edit the site in production, but you can do it differently -
make a copy of the site (it’s especially convenient to do this through the ssh console, and if not, the duplicator plugin will do). place a copy of the site on a subdomain and close the subdomain from indexing! And then edit everything on the subdomain and transfer the feast of need to the working site.
Download the entire site and edit the necessary files locally, and then upload back to the hosting?

If you have a local copy saved, then you can not download the entire site. Total Commander (if you're on Windows) or Double Commander (if you're on linux) has a directory comparison feature. You compare directories and download those directories and files that have changed. Well also fill in a new DB.

it is not yet clear how to do this safely and which files to back up. Yes, there is a child theme, but this is not a reserve.

As for the backup copy of the site, you make backups in any case. For example, the use your drive plugin. And you can create an application on google drive and upload backups through this plugin there, you can upload to Yandex disk via webdav. If this is a VPS, then you can make backups at the system level

E
EvgenyMorozov, 2020-06-16
@EvgenyMorozov

Try Github, Gitlab. Plugin https://wppusher.com/ for help.

L
lagudal, 2020-06-16
@lagudal

A local mirror of the site will never hurt, and develop on it.
Did it before. I raised a virtual machine with OS and a web environment as identical as possible to that on the prod.
I usually synchronized the changes that I applied locally with rsync, but if suddenly, for some reason, shared hosting without ssh was used, then there was one script on perl, ftpsync it seems. A little slower than rsync, but not everything is replaced, but only new and changed files.
Now as a local vps server from amazon, the applied changes are pushed to the git and applied to the prod with a flick of the fingers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question