Export and import, only new and updated WordPress data
Export and import, only new and updated WordPress data
Export and import, only new and updated WordPress data
Is there a way to force plugins to use Flyway migrations for database changes?
If you can access WP CLI, you can use the search-replace command to search the database for the old URL and replace with the new URL.
I’d change the first part of your htaccess from RewriteEngine On RewriteCond %{HTTP_HOST} !^stagin\.mysite\.com$ RewriteRule ^(.*)$ https://stagin.mysite.com/$1 [R=301,L to RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] This will take any request to any site and force it to SSL. Then the rest of the htaccess will take care of the WordPress stuff. I … Read more
Compare WordPress Staging and Development
I usually append a random number to the end of the stylesheet while in development mode, if I upload the file to the production server I manually change the version number like this: // Version – to prevent caching $version = mt_rand(1000, 100000); // $version = 1.0.0.0; // Enqueue CSS function wpb_enqueue_styles() { global $version; … Read more
Well, like many things it was just a matter of playing the waiting game. The main URL now works fine. Just needed to wait a few days, I guess!
It’s really up to you. As a developer, I prefer working locally but if you do not develop but only add/remove/update themes and plugins, then a subdomain can be great. This way, you can freely break your website without disturbing anyone. Nowadays, lots of hosts providers are offering to create staging website in one click. … Read more
Use a Plugin First of all, your CODE looks fine. However, it’s better if you put that code in a small custom Plugin. That way, you can easily keep the plugin active on the development and staging sites and deactivate it on the main site. Changing the themes back and forth in the staging and … Read more
SOLVED: This is Apache2 on Debian: added the following to the ./sites-available/wp_container.conf virtual hosts file. Note that AllowOverride must be placed inside <Directory …> … Include conf-available/rewrite.conf <Directory /var/www/html/wp_container/> AllowOverride All </Directory> …