Deploy WordPress From Local Docker to Hosting Provider
Deploy WordPress From Local Docker to Hosting Provider
Deploy WordPress From Local Docker to Hosting Provider
I would suggest to go with KLogger more specifically a fork of it which is simple and clean, and i have a few sites logging using this simple class with no problems or complains.
This isn’t really a WordPress question – more a generic web development issue. These are some open source tools that can be used for scripting and testing a web browser session. Selenium Cucumber Watir
I sometimes use this plugin http://wordpress.org/extend/plugins/duplicator/ it works pretty well if your server enviroment meets it’s requirements. Otherwise, it’s the good ole, mysql dump route that the other guys explained.
$user_id = $this->_make_user(‘author’, ‘user_login_name’, ‘password’, ‘[email protected]’); wp_set_current_user( $user_id ); as long as the class that you define the testcase in inherits from WPTestCase, then you can use the _make_user function. The function is found in this svn repository, and is defined in wp-testlib/base.php line 380. NEW: I switched to using wp_insert_user. the following is in … Read more
One is official, the other one is a 3rd party library by 10up, so people tend to use the official WP_UnitTestCase There is no right or wrong choice however, use the library you prefer Is there anything I am missing out here? No, some tests that core conducts require a temporary WP install to fully … Read more
I would just hook into determine_current_user filter and check HTTP basic auth data to return the user. Maybe, just maybe, I would allow only specific user to be logged via HTTP auth. That could be done, for example, by setting an user option. The code could look like something like this (tested by OP): add_filter( … Read more
I’d take a look at how WordPress has constructed their attachment tests. You’ll find that tests/phpunit/tests/post/attachments.php they use this method: function _make_attachment( $upload, $parent_post_id = 0 ) { $type=””; if ( !empty($upload[‘type’]) ) { $type = $upload[‘type’]; } else { $mime = wp_check_filetype( $upload[‘file’] ); if ($mime) $type = $mime[‘type’]; } $attachment = array( ‘post_title’ … Read more
In this situation, I’d recommend the following: Dump your production database into your test database Install WP 3 and point it at your test DB Run the database upgrade Turn users loose on the test instance We used a similar process on a much larger installation, and it worked fairly well. Having the second instance … Read more
Few built-in wp-cli generate commands from the docs: # Generate posts with fetched content. # See https://developer.wordpress.org/cli/commands/post/generate/ $ curl -N http://loripsum.net/api/5 | wp post generate –post_content –count=10 # Add meta to every generated term. # See https://developer.wordpress.org/cli/commands/term/generate/ $ wp term generate category –format=ids –count=3 | xargs -d ‘ ‘ -I % wp term meta add … Read more