1
votes

I have a Wordpress-theme-based web published on the net, uploaded in a hosting. I have to edit/simplify/modify the whole page, offline, on local for example. While I make the changes offline, the page (an online magazine) has to keep online, as it is, until I publish the new version. I have to be able to show the changes online, without affecting the original until the end.

What is a good way to do the whole process? Thank you very much.

2

2 Answers

1
votes
  1. Make offline server by installing eg. XAMPP.
  2. Copy files, and export database from online to local,
  3. Modify wp-config.php to match local database settings
  4. Modify theme offline
  5. Upload theme to online FTP when work is done

Make sure if changes you made are only in wp-content/themes/theme_name files - not in database content. If not, you will have to sync databases.

You can make the same to work online by cloning your WP to eg. subdomain, then protect it by htpasswd, to prevent unauthorised access.

0
votes

I assume you mean with the same content?

One way is to make a copy of the main database (possibly refresh it now and then) for a second install online, with same plugins, settings etc.

Another way (bit riskier, but would give realtime sameness) would be to have a demo install on the same server that shares the same database: https://codex.wordpress.org/Editing_wp-config.php#table_prefix. I'd suggest with a custom user and usermeta where NO ONE has update privileges to avoid updates to the main site https://codex.wordpress.org/Editing_wp-config.php#Custom_User_and_Usermeta_Tables