Developing on plesk - wordpress

Trying to figure the best way to develop on plesk.
I would like to develop my wordpress website on a temporary url, and attach the production domain only when I am done developing.
From some reason I'm getting various dns errors, saw a guide referring to change of hosts file but it dosent seem like the perfect solution to me.
Any tips?

You may create the clone of your WP instance (staging) and use Plesk Git extension for developing this staging WP site. After making all necessary changes on staging non-public clone you can publish it to a production domain to make it publicly available.

Related

Ho to configure WordPress with GitLab

I'm pretty new to this, but I want to configure my GitLab repo to my Cpanel hosting account. So when I push changes from my local site (environment using local by flywheel) to GitLab it automatically goes to the staging site and if everything is good to the production site.
I have managed to connect my Cpanel account with GitLab by using Deploy HQ. However, I'm trying to understand the best way to set all of this up. Currently, I'm only tracking my themes folder in GitLab. My issue is that when I deploy, all that is getting uploaded is the themes folder(obviously). How do I set this up so it will upload the full WordPress site and database? Also, how do I set it up with staging and production, would I have two different branches connected to two different directories on cpanel?
I'm just looking for some noob friendly advice on how to set up this infrastructure for WordPress Git and Cpanel.

Can I push staging to live using managed wordpress hosting like Kinsta or Wp Engine while site is developed using trellis/bedrock?

I have successfully developed my first site using Trellis/Bedrock/Sage. I have deployed it to staging and live on Kinsta without having any trouble.
Some redirection problems occurs when I add my real domain on Kinsta e.g. example.kinsta.cloude to example.com. I contacted the support and they told me they fixed it by making changes to my .env file. After fixing issues it started to redirecting in never ending loop due to SSL issue. It is resolved when I added my SSL. Now keep in mind my situation and please guide me.
Now I am making changes to the site in dev and deploying it to staging for testing live and showing it to client. Once they approve changes I need to push it to live. I have two questions:
1- Should I use Kinsta’s default button “Push Staging to Live” for deploying it to live?
2- Should I use Ansible deploy for this purpose also what changes I need to make and where to make so that .env related issues will not rise again. Also will SSL be an issue if I deploy using Trellis/Bedrock?
Thanks in advance for your advise.
I found the answer myself if we use bedrock setup we can not use Kinsta’s default button “Push Staging to Live” for deploying it to live. We must need to follow the way Ansible deploy for this purpose.

How to run a wordpress.com hosted website locally using docker?

Currently we have a WooCommerce webshop hosted on wordpress.com. This webshop was setup as a prototype and because of its succes we want to start developing the webshop further. We don't want to change the production website directly, but we want to develop inside a closed development environment (e.g. locally using docker).
I have tried to run the webshop locally by exporting all its data using the All-in-One WP Migration plugin. Afterwards I have created a docker environment with a wordpress and a mysql container. On the wordpress container I've also installed the All-in-One WP Migration plugin and I've imported all the data. It looked like this worked fine, but after a few clicks I saw that I could not navigate to any other URL besides the homepage. I have read online that the Wordpress codebase being used on wordpress.com differs from the default codebase which can be download on wordpress.org. So I think this means the wordpress.com export file can't be imported into a default wordpress container.
Because of this I've tried to download all the files on wordpress.com using FTP and run the website myself using a php container. This also didn't work, because I can't download all the files using FTP because of the permissions. I also contacted the support of wordpress.com, and they told me they couldn't sent me the contents of these files. But without these files, I don't know how I can run the wordpress.com website locally.
I hope someone can help me with getting the wordpress.com website to run locally in a development environment. A suggestion how we can implement a workflow where we can change the webshop in a development environment and deploy the changes to our production website is also very welcome.
Edit: For now I've chosen to run my site in a docker environment and write down all the changes I make locally. When I'm satisfied with the site locally, I will repeat the changes I made earlier on the production website. I've chosen this workflow because I don't really know the structures inside Wordpress. I don't know how I can migrate the files and database tables I need to switch theme, without overwriting the database tables I want to keep (e.g. WooCommerce orders table).
Have you tried running it on a localhost? MAMP is a good option for this.
https://www.mamp.info/en/

Deploying First WP Site with Understrap, Can't Find Required Resources

I've transferred my database and entire Wordpress file structure over to the live site, but the live site is still looking for all its resources at localhost:8888/.
I looked back on what I did when getting started and I edited my gulpfile.js to include
var browserSyncOptions = {
proxy: 'localhost:8888',
notify: false
};
Thinking this was the issue, I switched it to proxy: $_SERVER['DOCUMENT_ROOT'], but still no luck. Any ideas for what I may be doing wrong?
Unfortunately I haven't been able to find a single bit of information about deploying an understrap themed site. Here are the docs for the theme though: https://understrap.com/demos/core/wp-content/themes/core-understrap/docs/.
I've transferred my database and entire Wordpress file structure over to the live site, but the live site is still looking for all its resources at localhost:8888/.
That is an easy to way to get into live server maintenance hell. UnderStrap is a unique theme package because it has strong npm dependencies running in the back-end that are appropriate for localhost development builds. For that reason, Here is an alternative approach I recommend instead.
Install a clean vanilla version of WordPress on your live server.
Install and activate UnderStrap.zip on your live server through wp-admin.
Import/Export your posts and pages from your local site, onto the live site. Add all media images. Adjust your settings, install your plugins, and clear your cache.
Now use the file manager in your C-Panel to only upload all modified theme files from your localhost to your live server.
Test your site, then go live.
That is more of a manual process, but it has its benefits. For one, you learn and see what each step looks like, you push up only what you need, you don't have localhost decencies running on your live site and the database is 100% targeted on live site content.
If you can access the wp-admin of your live site there's a great plugin called Velvet Blues Update URLs that you can install.
Install it, go to Tools > Update URLs and enter the localhost address and then the live site address.
Always works great for me.
Many developers have done this process by running its gulp dist when processing deployment. It will create dist folder which you can upload on the server. It contains all necessary files that supports running the scss. So try to use also the gulp dist-product as a "product" that the theme can be published and downloaded in the near future.

WordPress dev in local, subdomain, or subfolder

I have a website running on a Wordpress theme. We have made many custom edits of the theme which now breaks when we turn on mobile version. We need to setup a test environment of the site so we can debug it. Is it best to setup a copy of the site as a subdomain, subfolder or do it locally. What is best practice. Thanks.
Best way would be a local setup. But if you don't want to configure to much to test it on your mobile device, you should setup a second installation on your server and make it available via a subdomain. (And of course, if it's on a live server, create a password protection to make it unseen for public eyes.)

Resources