Website Summary Files Commits Branches @commit @diff @stats
path: root / deploy.php
diff options
context:
space:
mode:
Commit03abe36d5c25d3007927443d7e0d366bc5037097 (patch)
Author
 metodiew <stanko@metodiew.com>
2020-07-08 20:37:56 +0300
Committer
 metodiew <stanko@metodiew.com>
2020-07-08 20:37:56 +0300
Files216ec9bf91adabf572b6bc2cda760517e1f786b6 /deploy.php
tues-interns-2020-03abe36d5c25d3007927443d7e0d366bc5037097.tar
tues-interns-2020-03abe36d5c25d3007927443d7e0d366bc5037097.tar.gz
tues-interns-2020-03abe36d5c25d3007927443d7e0d366bc5037097.zip
Parent6b86b5d7ffc658444764bab7edfca40c8f97ec92 (diff)
Add a deploy.php file and update some setup details
1 files changed, 17 insertions, 0 deletions
-rw-r--r--deploy.php17
diff --git a/deploy.php b/deploy.php
new file mode 100644
index 0000000..9035b63
--- /dev/null
+++ b/deploy.php
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * Get the latest version of the master branch
+ */
+echo shell_exec( 'git fetch origin master; ');
+echo shell_exec( 'git checkout master; ');
+echo shell_exec( 'git pull origin master; ');
+echo shell_exec( 'wp cache flush ');
+
+// Load WordPress
+require_once( 'wp-load.php' );
+
+// Display a link to the homepage
+echo '<div>';
+echo 'You are ready to check the <a href="' . home_url( '/' ) . '">Homepage</a>';
+echo '</div>'; \ No newline at end of file