💎 PREMIUM: Changeset/ - Uncensored 2025

Changeset 2690043


Ignore:
Timestamp:
03/07/2022 02:17:53 PM (4 years ago)
Author:
wpseahorse
Message:

3.1.0

  • feature - #32 updated launch-success view layout & contents
  • bugfix - #35 switch-off multi-site support
  • feature - #36 updated configuration for remote manage API
  • fix - #37 removed check for amazon polly plugin conflict
  • testing - #38 tested to WordPress version 5.9
  • fix #41 updates to text, image, and external links on launch screen
Location:
wp-migrate-2-aws/trunk
Files:
2 added
13 edited

Legend:

Unmodified
Added
Removed
  • wp-migrate-2-aws/trunk/admin/assets/scripts.js

    r2626222 r2690043  
    5151//     }
    5252//   );
    53  
     53
    5454// };
    5555
     
    7878                // return;
    7979        }
    80        
     80
    8181        if (typeof result.progressComplete !== 'undefined') {
    8282            progressComplete = result.progressComplete;
     
    8585            wpm2aws_changeProgressBarToWarning($);
    8686        }
    87        
     87
    8888    })
    8989    .fail(function(jqXHR, textStatus, errorThrown) {
     
    103103    let mainProgressBar = $("#wpm2aws-progress-bar-main");
    104104    let sideProgressBar = $("#wpm2aws-progress-bar");
    105    
     105
    106106    let progressBars = [];
    107107
     
    152152
    153153    // Click the re-start button
    154     // console.log("Çlick Restart");
    155154    reStartBtn.click();
    156155}
     
    175174}
    176175
     176function wpm2aws_launchBuildProgress($)
     177{
     178    let progressBarContainer = $('#wpm2aws-launch-build-progress-bar');
     179
     180    // If not on a page where the progress bar exists, then cancel this function
     181    if (progressBarContainer.length < 1) {
     182       return;
     183    }
     184
     185    let buildCompleteBar = $('#wpm2aws-launch-build-completed');
     186
     187    let totalTime = buildCompleteBar.data('totalTime');
     188    let timeRemaining = buildCompleteBar.data('remainingTime');
     189
     190    let refreshInterval = 10;
     191    let timeOutInterval = (refreshInterval * 1000);
     192
     193    let expendedTime = totalTime - timeRemaining;
     194    let expendedTimePercent = expendedTime / totalTime;
     195    let progressBarContainerWidth = progressBarContainer.width();
     196    let progressBarWidth = progressBarContainerWidth * expendedTimePercent;
     197    let progressBar = progressBarContainer.find('div.wpm2aws-launch-build-completed-progress-bar');
     198    let animationDuration = 1000;
     199
     200    // Start the progress bar a little larger than non-existant
     201    if (expendedTimePercent < 0.02) {
     202        progressBarWidth = progressBarContainerWidth * 0.02;
     203    }
     204
     205    progressBar.animate(
     206        {
     207            width: progressBarWidth
     208        },
     209        animationDuration,
     210        "linear"
     211    );
     212
     213    timeRemaining -= refreshInterval;
     214    buildCompleteBar.data('remainingTime', timeRemaining);
     215
     216    if (timeRemaining > 0) {
     217        $('.wpm2aws-launch-build-launch-button').hide();
     218        $('.wpm2aws-launch-build-notice').show();
     219        $('.wpm2aws-instance-launch-text-before-launch-complete').show();
     220        $('.wpm2aws-instance-launch-text-after-launch-complete').hide();
     221        $('#wpm2aws-summary-section button').prop('disabled', true);
     222
     223        setTimeout(
     224            function() {
     225                wpm2aws_launchBuildProgress($);
     226            },
     227            timeOutInterval
     228        );
     229    } else {
     230        $('.wpm2aws-launch-build-launch-button').show();
     231        $('.wpm2aws-launch-build-notice').hide();
     232        $('.wpm2aws-instance-launch-text-before-launch-complete').hide();
     233        $('.wpm2aws-instance-launch-text-after-launch-complete').show();
     234        $('#wpm2aws-summary-section button').removeAttr('disabled');
     235    }
     236}
     237
    177238let progressBar;
    178239let progressBarParent;
     
    184245// On load - bind Functions
    185246jQuery(document).ready(function($) {
     247
     248    // Confirmation dialog before reset
     249    $("#wpm2aws-reset-form").on('submit', function() {
     250        return confirm('Do you really want reset? Upon reset all progress will be lost.');
     251    });
     252
    186253    $(".wpm2aws-edit-inputs-button").on("click", function() {
    187254        wpm2awsEditSettings($(this).attr("data"));
     
    234301        uploadSuccessNotice = null;
    235302    }
    236    
     303
    237304    if (typeof progressBar !== 'undefined' && progressBar !== null && progressBar.length !== 0) {
    238305        progressComplete = progressBar.data('progress');
     
    246313            function(){
    247314                wpm2aws_getCurrentProgress($);
    248                
     315
    249316                if (progressComplete >= 100) {
    250317                    console.log("Greater than 100");
    251318
    252319                    clearInterval(loop);
    253                    
     320
    254321                    if (typeof uploadSuccessNotice === 'undefined' || uploadSuccessNotice === null || uploadSuccessNotice.length === 0) {
    255322                        location.reload();
    256323                    }
    257                    
     324
    258325                }
    259326            },
     
    270337      function(){
    271338        wpm2aws_getCurrentProgress($);
    272        
     339
    273340        if (0 === counter) {
    274341          clearInterval(loop);
     
    279346  });
    280347
     348    // Launch Build Progress Bar
     349    wpm2aws_launchBuildProgress($);
    281350});
  • wp-migrate-2-aws/trunk/admin/assets/styles.css

    r2603472 r2690043  
    163163}
    164164
     165/* Styles for instance launch screen */
     166.wpm2aws-instance-launch-graphic {
     167    max-width: 100%;
     168    background-color: #1a7899;
     169    width: 30%;
     170}
     171
     172.wpm2aws-instance-launch-graphic img {
     173  width:100%;
     174}
     175
     176.wpm2aws-instance-launch-graphic-content {
     177  color: #fff;
     178  text-align: center;
     179  padding: 15px;
     180}
     181
     182.wpm2aws-instance-launch-graphic-content h3,
     183.wpm2aws-instance-launch-graphic-content h2 {
     184  color:#fff;
     185}
     186
     187.wpm2aws-instance-launch-graphic-content h2 {
     188  font-size:32px;
     189}
     190
     191.wpm2aws-launch-instance-details {
     192  padding:20px;
     193  width: 60%;
     194}
     195
     196.wpm2aws-launch-instance-details-right-image {
     197    width: 30%;
     198}
     199.wpm2aws-launch-instance-details-right-image img {
     200    width: 100%;
     201}
     202
     203.wpm2aws-launch-popup-button-container {
     204    margin: 5px 0;
     205}
     206
     207.wpm2aws-launch-popup-button {
     208    background: #fff;
     209    padding: 10px 20px;
     210    display: inline-block;
     211    text-decoration: none;
     212    border-radius: 30px;
     213    font-weight: 600;
     214    font-size: 14px;
     215}
     216
     217#wpm2aws-launch-build-progress-bar {
     218  width: 100%;
     219  margin: 10px 0;
     220  height: 22px;
     221  background-color: #f0f0f0;
     222  border-radius:10px;
     223  border:1px solid #1A7899;
     224}
     225
     226#wpm2aws-launch-build-completed {
     227  height: 100%;
     228  text-align: center;
     229  width: 0;
     230  background-color: #1A7899;
     231  box-sizing: border-box;
     232  border-radius:10px;
     233  border:2px solid #f0f0f0;
     234}
     235
     236#wpm2aws-launch-build-progress-bar-background-loop {
     237    position: relative;
     238    height: 14px;
     239    width:100%;
     240    background-color: #2ba3ca;
     241    animation:wpm2aws-progress-bar-background-loop 2s linear infinite;
     242    border-radius:4px;
     243    border-top:2px solid #1A7899;
     244    border-bottom:2px solid #1A7899;
     245}
     246
     247#wpm2aws-launch-build-progress-bar span {
     248  text-align: center;
     249  color: #fff;
     250}
     251
     252@keyframes wpm2aws-progress-bar-background-loop {
     253    0% {
     254        left:0%;
     255        right:100%;
     256        width:0%;
     257    }
     258    10% {
     259        left:0%;
     260        right:75%;
     261        width:25%;
     262    }
     263    90% {
     264        right:0%;
     265        left:75%;
     266        width:25%;
     267    }
     268    100% {
     269        left:100%;
     270        right:0%;
     271        width:0%;
     272    }
     273}
     274
     275/*custom versions of deprecated build-in wordpress css classes*/
     276.wpm2aws-welcome-panel-content {
     277    margin-left: 13px;
     278    max-width: 1500px;
     279}
     280
     281.wpm2aws-welcome-panel .wpm2aws-welcome-panel-column-container {
     282    clear: both;
     283    position: relative;
     284}
     285
     286.wpm2aws-welcome-panel .wpm2aws-welcome-panel-column {
     287    width: 32%;
     288    min-width: 200px;
     289    float: left;
     290}
     291
     292.wpm2aws-welcome-panel .wpm2aws-welcome-panel-close {
     293    position: absolute;
     294    top: 10px;
     295    right: 10px;
     296    padding: 10px 15px 10px 21px;
     297    font-size: 13px;
     298    line-height: 1.23076923;
     299    text-decoration: none;
     300}
     301
     302.wpm2aws-welcome-panel {
     303    position: relative;
     304    overflow: auto;
     305    margin: 16px 0;
     306    padding: 23px 10px 0;
     307    border: 1px solid #c3c4c7;
     308    box-shadow: 0 1px 1px rgb(0 0 0 / 4%);
     309    background: #fff;
     310    font-size: 13px;
     311    line-height: 1.7;
     312}
     313
     314.wpm2aws-welcome-panel .wpm2aws-welcome-panel-close:before {
     315    background:0 0;
     316    color:#787c82;
     317    content:"\f153";
     318    display:block;
     319    font:normal 16px/20px dashicons;
     320    speak:never;
     321    height:20px;
     322    text-align:center;
     323    width:20px;
     324    -webkit-font-smoothing:antialiased;
     325    -moz-osx-font-smoothing:grayscale;
     326}
  • wp-migrate-2-aws/trunk/admin/classes/adminMigrate.class.php

    r2603472 r2690043  
    701701        }
    702702
    703         $msg =  __('Success!<br><br>Lightsail Launched<br><br><a href="http://' . $instance['publicIp'] . '/" target="_blank">' . $instance['publicIp'] . '</a>', 'migrate-2-aws');
    704         set_transient('wpm2aws_admin_success_notice_' . get_current_user_id(), $msg);
     703     $msg =  __('Success! Site clone is building.', 'migrate-2-aws');
     704     set_transient('wpm2aws_admin_success_notice_' . get_current_user_id(), $msg);
    705705
    706706        exit(wp_redirect(admin_url('/admin.php?page=wpm2aws')));
  • wp-migrate-2-aws/trunk/admin/classes/apiGlobal.class.php

    r2636772 r2690043  
    1515class WPM2AWS_ApiGlobal
    1616{
     17    const WPM2AWS_API_TIMEOUT = 180;
     18
    1719    private $credentials;
     20
    1821    public function __construct()
    1922    {
     
    22942297            array(
    22952298                'method' => 'POST',
    2296                 'timeout' => 45,
     2299                'timeout' => self::WPM2AWS_API_TIMEOUT,
    22972300                'redirection' => 10,
    22982301                'httpversion' => '1.0',
     
    24032406            array(
    24042407                'method' => 'PUT',
    2405                 'timeout' => 45,
     2408                'timeout' => self::WPM2AWS_API_TIMEOUT,
    24062409                'redirection' => 10,
    24072410                'httpversion' => '1.0',
     
    25092512            array(
    25102513                'method' => 'POST',
    2511                 'timeout' => 45,
     2514                'timeout' => self::WPM2AWS_API_TIMEOUT,
    25122515                'redirection' => 10,
    25132516                'httpversion' => '1.0',
     
    26242627            array(
    26252628                'method' => 'POST',
    2626                 'timeout' => 45,
     2629                'timeout' => self::WPM2AWS_API_TIMEOUT,
    26272630                'redirection' => 10,
    26282631                'httpversion' => '1.0',
     
    27452748            array(
    27462749                'method' => 'POST',
    2747                 'timeout' => 45,
     2750                'timeout' => self::WPM2AWS_API_TIMEOUT,
    27482751                'redirection' => 10,
    27492752                'httpversion' => '1.0',
  • wp-migrate-2-aws/trunk/admin/classes/apiRemote.class.php

    r2636772 r2690043  
    33class WPM2AWS_ApiRemote
    44{
     5    const WPM2AWS_API_TIMEOUT = 180;
     6
    57    public function __construct()
    68    {
     
    8385            array(
    8486                'method' => 'POST',
    85                 'timeout' => 45,
     87                'timeout' => self::WPM2AWS_API_TIMEOUT,
    8688                'redirection' => 10,
    8789                'httpversion' => '1.0',
  • wp-migrate-2-aws/trunk/admin/classes/apiRemoteIam.class.php

    r2636772 r2690043  
    44class WPM2AWS_ApiRemoteIam
    55{
     6    const WPM2AWS_API_TIMEOUT = 180;
     7
    68    private $requestData;
    79
     
    4749            array(
    4850                'method' => 'POST',
    49                 'timeout' => 45,
     51                'timeout' => self::WPM2AWS_API_TIMEOUT,
    5052                'redirection' => 10,
    5153                'httpversion' => '1.0',
  • wp-migrate-2-aws/trunk/admin/classes/apiRemoteS3.class.php

    r2636772 r2690043  
    33class WPM2AWS_ApiRemoteS3
    44{
     5    const WPM2AWS_API_TIMEOUT = 180;
     6
    57    private $requestData;
    68    private $bucketName;
     
    4547            array(
    4648                'method' => 'POST',
    47                 'timeout' => 45,
     49                'timeout' => self::WPM2AWS_API_TIMEOUT,
    4850                'redirection' => 10,
    4951                'httpversion' => '1.0',
     
    98100            array(
    99101                'method' => 'POST',
    100                 'timeout' => 45,
     102                'timeout' => self::WPM2AWS_API_TIMEOUT,
    101103                'redirection' => 10,
    102104                'httpversion' => '1.0',
     
    160162            array(
    161163                'method' => 'POST',
    162                 'timeout' => 45,
     164                'timeout' => self::WPM2AWS_API_TIMEOUT,
    163165                'redirection' => 10,
    164166                'httpversion' => '1.0',
  • wp-migrate-2-aws/trunk/admin/includes/adminFunctions.php

    r2636772 r2690043  
    11<?php
     2
     3function wpm2awsGetLogActionApiTimeOut()
     4{
     5    return 60;
     6}
     7
     8function wpm2awsGetValidateLicenceActionApiTimeOut()
     9{
     10    return 60;
     11}
     12
    213function wpm2awsAddUpdateOptions($optionName, $value)
    314{
     
    647658        array(
    648659            'method' => 'POST',
    649             'timeout' => 45,
     660            'timeout' => wpm2awsGetValidateLicenceActionApiTimeOut(),
    650661            'redirection' => 10,
    651662            'httpversion' => '1.0',
     
    713724        array(
    714725            'method' => 'POST',
    715             'timeout' => 45,
     726            'timeout' => wpm2awsGetLogActionApiTimeOut(),
    716727            'redirection' => 10,
    717728            'httpversion' => '1.0',
  • wp-migrate-2-aws/trunk/admin/includes/adminPages.class.php

    r2583496 r2690043  
    1212    public static function loadIAMform()
    1313    {
    14 
    15 
    1614        self::makePageHeading(1);
    1715
     
    304302                'TRIAL' === strtoupper(get_option('wpm2aws_valid_licence_type'))
    305303        ) {
    306            
     304
    307305        }
    308306        else{
     
    22482246
    22492247        $html = '';
    2250         $html .= '<form class="wpm2aws-align-right" method="post" action="' . esc_url(admin_url('admin-post.php')) . '?action=' . $formAction . '">';
     2248        $html .= '<form id="wpm2aws-reset-form" class="wpm2aws-align-right" method="post" action="' . esc_url(admin_url('admin-post.php')) . '?action=' . $formAction . '">';
    22512249        $html .= '<input type="hidden" name="action" value="' . $formAction . '" />';
    22522250        $html .=  wp_nonce_field($formAction);
     
    25932591        return $html;
    25942592    }
     2593
     2594    /**
     2595     * Convert instance created at time to formatted output
     2596     */
     2597    private static function formatInstanceLaunchTime($createdAt)
     2598    {
     2599        try {
     2600            $dateTime = new \DateTime($createdAt);
     2601        } catch (Exception $exception) {
     2602            $exceptionMessage= $exception->getMessage();
     2603
     2604            return \sprintf('not available (%s)', $exceptionMessage);
     2605        }
     2606
     2607        return $dateTime->format('Y-m-d H:i:s');
     2608    }
     2609
     2610    /**
     2611     * Function to calculate the time for progress bar
     2612     *
     2613     * @param int $buildDurationSeconds
     2614     * @param string $instanceLaunchTime
     2615     *
     2616     * @return false|int
     2617     */
     2618    private static function remainingTimeInSecondsForProgressBar($buildDurationSeconds, $instanceLaunchTime)
     2619    {
     2620        $launchTimeUnix = \strtotime($instanceLaunchTime);
     2621
     2622        if ($launchTimeUnix === false) {
     2623            return false;
     2624        }
     2625
     2626        $expectedBuildTime = $launchTimeUnix + $buildDurationSeconds;
     2627        $now = \time();
     2628        $timeRemaining = $expectedBuildTime - $now;
     2629
     2630        if ($timeRemaining < 1) {
     2631            return false;
     2632        }
     2633
     2634        return $timeRemaining;
     2635    }
     2636
    25952637    // Current Settings Section
    2596 
    25972638    private static function makeConfirmedLightsailInfoSection()
    25982639    {
    2599         if (get_option('wpm2aws-lightsail-instance-details') !== false) {
    2600             $lightsailDetails = get_option('wpm2aws-lightsail-instance-details');
    2601             // 'name' => $name, 'region' => $region, 'publicIp'
    2602 
    2603 
    2604             echo '<div class="wpm2aws-inputs-row" style="border-color:#DD6B10;width:97%;padding:15px 10px;display:block;">';
    2605             echo '<h3>AWS Instance Launch Activated Successfully</h3>';
    2606             echo '<h4>Your instance is currently being compiled and will be available shortly.</h4>';
    2607             echo '<h4>An email will be sent to the email address associated with your licence key with further information and active links.</h4>';
    2608             echo '<h4>The details outlined below are for reference only.</h4>';
    2609             echo '<ul>';
    2610             if (defined('WPM2AWS_TESTING')) {
    2611                 echo '<li> <strong>Instance Name: </strong>' . $lightsailDetails['name'] . '</li>';
    2612             }
    2613             echo '<li> ======================================== </li>';
    2614             echo '<li> <strong>Region: </strong>' . $lightsailDetails['region'] . '</li>';
    2615             $instance_datetime = $lightsailDetails['details']['createdAt'];
    2616             $instance_datetime = str_replace('T', ' T ', $instance_datetime);
    2617             echo '<li> <strong>Launch Time: </strong>' . $instance_datetime . '</li>';
    2618             echo '<li> <strong>Source URL: </strong>' . get_bloginfo('wpurl') . '</li>';
    2619             ///echo '<li> <a href="http://' . $lightsailDetails['publicIp'] . '/wp-admin/admin.php?page=wpm2aws" target="_blank">Site Login</a> <span style="font-size:12px;"><i>(Login with your existing user access details)</i></span></li>';
    2620             echo '<li> ======================================== </li>';
    2621             echo '</ul>';
    2622 
    2623             /// show this to the review user
    2624              if (
    2625                 false !==  get_option('wpm2aws_valid_licence_type') &&
    2626                 'TRIAL' === strtoupper(get_option('wpm2aws_valid_licence_type'))
    2627             ) {
    2628                 echo '<h3>Clone to AWS Trial</h3>';
    2629                 echo '<p>This temporary site will remain active for review for 36 hours after launch.</p>';
    2630                 echo '<p>At this point it will be shut-down unless users choose to <a target="_blank" href="https://www.seahorse-data.com/pricing/">purchase a plan or licence</a> for ongoing WordPress Hosting on AWS</p>';
    2631                 echo '<p>To migrate a site to your own AWS account <a target="_blank" href="https://www.seahorse-data.com/pricing/">please click here to select a licence</a></p>';
    2632 
    2633                     // echo '<ul>';
    2634                     // echo '<li>Tier 1: <a target="_blank" href="https://www.seahorse-data.com/checkout?edd_action=add_to_cart&download_id=1330&edd_options[price_id]=1">Add to Cart</a></li>';
    2635                     // echo '<li>Tier 2: <a target="_blank" href="https://www.seahorse-data.com/checkout?edd_action=add_to_cart&download_id=7318&edd_options[price_id]=1">Add to Cart</a></li>';
    2636                     // echo '<li>Tier 3: <a target="_blank" href="https://www.seahorse-data.com/checkout?edd_action=add_to_cart&download_id=7320&edd_options[price_id]=2">Add to Cart</a></li>';
    2637                     // echo '<li>Tier 4: <a target="_blank" href="https://www.seahorse-data.com/checkout?edd_action=add_to_cart&download_id=7322&edd_options[price_id]=2">Add to Cart</a></li>';
    2638                     // echo '<li>Tier 5: <a target="_blank" href="https://www.seahorse-data.com/checkout?edd_action=add_to_cart&download_id=7325&edd_options[price_id]=2">Add to Cart</a></li>';
    2639                     // echo '<li>Tier 6: <a target="_blank" href="https://www.seahorse-data.com/checkout?edd_action=add_to_cart&download_id=7327&edd_options[price_id]=2">Add to Cart</a></li>';
    2640                     // echo '</ul>';
    2641 
    2642             } else {
    2643                 /// show this to a paid user (not review licence)
    2644                 if (false !== get_option('wpm2aws_lightsail_ssh') && '' !== get_option('wpm2aws_lightsail_ssh')) {
    2645                     echo '<h3>NB: Download and store this SSH Key securely.</h3>';
    2646                     $shhDetails = get_option('wpm2aws_lightsail_ssh');
    2647                     if (!empty($shhDetails['prkey'])) {
    2648                         if (!file_exists(WPM2AWS_KEY_DOWNLOAD_PATH)) {
    2649                             wpm2aws_makeDownloadKeyFile();
    2650                         }
    2651                         echo self::makeShhKeyDownloadButton();
     2640        if (get_option('wpm2aws-lightsail-instance-details') === false) {
     2641            return;
     2642        }
     2643
     2644        $lightsailDetails = get_option('wpm2aws-lightsail-instance-details');
     2645
     2646        $instance_datetime = $lightsailDetails['details']['createdAt'];
     2647        $formattedLaunchDate = self::formatInstanceLaunchTime($instance_datetime);
     2648
     2649        $buildDurationSeconds = (15 * 60); // 15 minutes
     2650
     2651        $remainingTime = self::remainingTimeInSecondsForProgressBar($buildDurationSeconds, $formattedLaunchDate);
     2652
     2653        echo '<div class="wpm2aws-inputs-row" class="wpm2aws-launch-instance-content" style="border-color:#DD6B10;width:97%;padding:15px 10px;display:flex;align-items: center;">';
     2654
     2655        echo self::makeLaunchGraphic($remainingTime);
     2656
     2657        echo '<div class="wpm2aws-launch-instance-details">';
     2658
     2659        if ($remainingTime !== false) {
     2660            echo '<div class="wpm2aws-launch-build-notice">';
     2661            echo '<h3>Hold tight, your site is building!</h3>';
     2662            echo '<p>You have successfully created a clone of your website on AWS! The site build is currently in progress.';
     2663            echo '<br>';
     2664            echo 'Links to your cloned site will be displayed once the build has completed. (average build time: 15 minutes approximately)</p>';
     2665            echo '<div id="wpm2aws-launch-build-progress-bar">';
     2666            echo '<div id="wpm2aws-launch-build-completed" class="wpm2aws-launch-build-completed-progress-bar" data-total-time="' . $buildDurationSeconds . '" data-remaining-time="' . $remainingTime . '">';
     2667            echo '<div id="wpm2aws-launch-build-progress-bar-background-loop"></div>';
     2668            echo '</div>';
     2669            echo '</div>';
     2670            echo '</div>';
     2671        }
     2672
     2673        echo "<a class='wpm2aws-launch-build-launch-button' target='_blank' style='background: #1a7899;padding: 10px 20px;border-radius: 30px;color: #fff;text-decoration: none;font-weight: 600;line-height: 1;margin: 0;' href='" . esc_url($lightsailDetails['publicIp']). "'>Visit Your Clone Site Here</a>";
     2674
     2675        echo '<h4 style="font-weight:bold">An email will be sent to the email address associated with your licence key with further information and active links.</h4>';
     2676        echo '<h4>The details outlined below are for reference only.</h4>';
     2677        echo '<ul style="padding:15px;background: #f0f0f0;color:#fff;color: #1a7899;border: 1px solid #e59335;border-radius: 5px;">';
     2678
     2679        if (defined('WPM2AWS_TESTING')) {
     2680            echo '<li> <strong>Instance Name: </strong>' . $lightsailDetails['name'] . '</li>';
     2681        }
     2682
     2683        echo '<li> <strong>Region: </strong>' . $lightsailDetails['region'] . ', (Ireland)</li>';
     2684
     2685        echo '<li> <strong>Launch Time: </strong>' . $formattedLaunchDate . '</li>';
     2686        echo '<li> <strong>Source URL: </strong>' . get_bloginfo('wpurl') . '</li>';
     2687        echo '<li> <strong>Plan Type: </strong>';
     2688        echo '<a target="_blank" style="color:#e59335;font-weight:600;" href="https://aws.amazon.com/lightsail/pricing/"> $10 per month</a>';
     2689        echo '</li>';
     2690        echo '</ul>';
     2691
     2692         // show this to the review user
     2693         if (
     2694            false !==  get_option('wpm2aws_valid_licence_type') &&
     2695            'TRIAL' === strtoupper(get_option('wpm2aws_valid_licence_type'))
     2696        ) {
     2697            echo '<h3>Clone to AWS Trial</h3>';
     2698            echo '<p>This temporary site will remain active for review for 36 hours after launch at which point it will be shut-down.</p>';
     2699            echo '<p>If you are interested in migrating to AWS after this time the Self-Managed option offers the full migration features in the plugin, connected directly to your own AWS account.</p>';
     2700            echo '<p>Would you like to know more? Check out the available options <a target="_blank" href="https://www.seahorse-data.com/pricing/">here</a>.</p>';
     2701        } else {
     2702            /// show this to a paid user (not review licence)
     2703            if (false !== get_option('wpm2aws_lightsail_ssh') && '' !== get_option('wpm2aws_lightsail_ssh')) {
     2704                echo '<h3>NB: Download and store this SSH Key securely.</h3>';
     2705                $shhDetails = get_option('wpm2aws_lightsail_ssh');
     2706                if (!empty($shhDetails['prkey'])) {
     2707                    if (!file_exists(WPM2AWS_KEY_DOWNLOAD_PATH)) {
     2708                        wpm2aws_makeDownloadKeyFile();
    26522709                    }
     2710                    echo self::makeShhKeyDownloadButton();
    26532711                }
    26542712            }
    2655 
    2656             echo '</div>';
    2657         }
     2713        }
     2714
     2715        echo '</div>';
     2716
     2717        echo '<div class="wpm2aws-launch-instance-details-right-image">';
     2718        echo '<img src="' . plugins_url('assets/images/launch-illustration.png', dirname(__FILE__)) . '">';
     2719        echo '</div>';
     2720
     2721        echo '</div>';
     2722    }
     2723
     2724    /**
     2725     * Generates the launch card with image.
     2726     *
     2727     * @return string
     2728     */
     2729    private static function makeLaunchGraphic($remainingTime)
     2730    {
     2731        $html = '';
     2732
     2733        $html .= '<div class="wpm2aws-instance-launch-graphic">';
     2734        $html .= '<div class="wpm2aws-instance-launch-graphic-img">';
     2735        $html .= '<img src="' . plugins_url('assets/images/launch-instance.png', dirname(__FILE__)) . '">';
     2736        $html .= '</div>';
     2737        $html .= '<div class="wpm2aws-instance-launch-graphic-content">';
     2738        $html .= '<h2>Congratulations!</h2>';
     2739
     2740        if ($remainingTime !== false) {
     2741            $html .= '<h3 class="wpm2aws-instance-launch-text-before-launch-complete">Your cloned site is currently building and will be available shortly</h3>';
     2742            $html .= '<h3 style="display:none;" class="wpm2aws-instance-launch-text-after-launch-complete">You have successfully created<br> your site clone instance!</h3>';
     2743        } else {
     2744            $html .= '<h3>You have successfully created<br> your site clone instance!</h3>';
     2745        }
     2746
     2747        $html .= '</div>';
     2748        $html .= '</div>';
     2749
     2750        return $html;
    26582751    }
    26592752
  • wp-migrate-2-aws/trunk/admin/includes/welcomePanel.class.php

    r2626222 r2690043  
    99
    1010    public static function template()
    11     {
    12         $classes = 'welcome-panel';
     11    { ?>
     12        <div id="welcome-panel" class="wpm2aws-welcome-panel">
     13            <?php wp_nonce_field('wpm2aws-welcome-panel-nonce', 'welcomepanelnonce', false); ?>
    1314
    14         $vers = (array) get_user_meta(
    15             get_current_user_id(),
    16             'wpm2aws_hide_welcome_panel_on',
    17             true
    18         );
     15            <div class="wpm2aws-welcome-panel-content">
     16                <div class="wpm2aws-welcome-panel-column-container">
    1917
    20         // if (wpm2aws_version_grep(wpm2aws_version('only_major=1'), $vers)) {
    21         //     $classes .= ' hidden';
    22         // }
    23         ?>
    24 
    25         <div id="welcome-panel" class="<?php echo esc_attr($classes); ?>">
    26             <?php wp_nonce_field('wpm2aws-welcome-panel-nonce', 'welcomepanelnonce', false); ?>
    27             <a class="welcome-panel-close" href="<?php echo esc_url(menu_page_url('wpm2aws', false)); ?>"><?php echo esc_html(__('Dismiss', 'migration-2-aws')); ?></a>
    28 
    29             <div class="welcome-panel-content">
    30                 <div class="welcome-panel-column-container">
    31 
    32                     <div style="max-width:25%;" class="welcome-panel-column  welcome-panel-first">
     18                    <div style="max-width:25%;" class="wpm2aws-welcome-panel-column  wpm2aws-welcome-panel-first">
    3319
    3420                        <p>
     
    3622                        </p>
    3723
    38                         <!--
    39                         <h3><span class="dashicons dashicons-shield" aria-hidden="true"></span> <?php echo esc_html(__("Before using this tool", 'migration-2-aws')); ?></h3>
    40                         <ul>
    41                         <li><?php //// echo esc_html(__("Understand the process.", 'migration-2-aws')); ?></li>
    42                         <li><?php /// echo esc_html(__("Read the documentation.", 'migration-2-aws')); ?></li>
    43                         <li><?php /// echo esc_html(__("Contact us if uncertain.", 'migration-2-aws')); ?></li>
    44                         </ul>
    45                         -->
    46 
    4724                        </div>
    4825                       
    49                         <div style="max-width:25%;border-left:1px solid #d2d2d2;padding-left:25px; margin-top:8px;" class="welcome-panel-column  welcome-panel-middle">
     26                        <div style="max-width:25%;border-left:1px solid #d2d2d2;padding-left:25px; margin-top:8px;" class="wpm2aws-welcome-panel-column  wpm2aws-welcome-panel-middle">
    5027                        <h3>Licence v.<?php echo constant("WPM2AWS_VERSION"); ?></h3>
    5128                        <p>
     
    10178                    </div>
    10279
    103                         <div style="max-width:25%;border-left:1px solid #d2d2d2;padding-left:25px; margin-top:8px;" class="welcome-panel-column  welcome-panel-last">
     80                        <div style="max-width:25%;border-left:1px solid #d2d2d2;padding-left:25px; margin-top:8px;" class="wpm2aws-welcome-panel-column  wpm2aws-welcome-panel-last">
    10481
    10582                        <h3><?php echo esc_html(__("Tutorial", 'migration-2-aws')); ?></h3>
  • wp-migrate-2-aws/trunk/readme.txt

    r2636772 r2690043  
    22Author: Seahorse
    33Contributors: wpseahorse, echomedia
    4 Tags: migration, AWS, migrate WordPress, manage AWS
    5 Requires at least: 4.4
    6 Tested up to: 5.7
     4Tags: migration, aws, migrate, manage, clone
     5Requires at least: 4.8
     6Tested up to: 5.9
    77Requires PHP: 5.6
    88Stable tag: trunk
    99
    10 Easily Clone and Manage sites in AWS from within your WordPress interface without any AWS knowledge! View this site on AWS Now for FREE!
     10Easily Migrate, Clone or Transfer sites to AWS from within your WordPress interface without any AWS knowledge! View this site on AWS Now for FREE!
    1111
    1212== Description ==
    1313
    14 Migrate, Clone or Transfer sites to AWS in 4 simple steps. Once migrated this software allows you to easily manage AWS Hosting (e.g. scale up/down, roll back etc.) via your WordPress interface. View your site on AWS today absolutely FREE! No AWS Cloud expertise required.
    15 
    16 **Get Free Licence Key** Simply [Click Here](https://www.seahorse-data.com/checkout?edd_action=add_to_cart&download_id=8272) to get a licence key to use the plugin today. Clone any site now to see your site in AWS for Free! No license fees or AWS usage charges will apply. Dev sites stay active for 36 hours after launch.
    17 
    18 **AWS Trial Tutorial** [Link to AWS Labs](https://aws.amazon.com/getting-started/hands-on/migrating-a-wp-website/)
    19 
    20 **Self Managed Tutorial** [Link to Self Managed Tutorial](https://www.seahorse-data.com/migrating-and-managing-wordpress-with-amazon-lightsail-self-manage/)
     14Migrate, Clone or Transfer sites to AWS in 4 simple steps. Once migrated this software allows you to easily manage AWS Hosting via your WordPress interface. View your site on AWS today absolutely **FREE!** No AWS Cloud expertise required.
     15
     16**Get Free Licence Key** Simply [Click Here](https://www.seahorse-data.com/checkout?edd_action=add_to_cart&download_id=8272) to get a licence key to use the plugin today. Clone any site now to see your site in AWS for Free! No license fees or AWS usage charges will apply. Trial instances stay active for 36 hours after launch.
     17
     18**AWS Trial User Guide** [Link to AWS Labs](https://aws.amazon.com/getting-started/hands-on/migrating-a-wp-website/)
     19
     20**AWS User Guide** [Link to Self Managed User Guide](https://www.seahorse-data.com/migrating-and-managing-wordpress-with-amazon-lightsail-self-manage/)
    2121
    2222### YOUR WORDPRESS AWS MANAGEMENT ASSISTANT
    2323
    2424= What does it do? =
    25 [WP on AWS](https://www.seahorse-data.com/) provides a data transfer and AWS architecture build solution through a simple to navigate interface **and** a control panel to easily manage the site's AWS infrastructure once transferred.  **No AWS Cloud Knowledge Required**
    26 
    27 * Provides an efficient and flexible tool for data transfer
    28 * Offers a simplified Architecture Selection / Build interface using Lightsail model
    29 * Builds complete AWS architecture using data from source
    30 * Presents an interface for Platform / DNS Configuration
    31 * Control Panel interface to Manage AWS infrastructure (via WordPress interface or Management Console)
     25[WP on AWS](https://www.seahorse-data.com/) provides an AWS data transfer & architecture build solution through a simple to navigate interface **and** a control panel to easily manage the site's AWS infrastructure once transferred.  **No AWS Cloud Knowledge Required**
    3226
    3327= Who is this plugin for? =
    34 This plugin is primarily aimed at WordPress Developers & Agencies who manage their clients hosting and have identified AWS as the solution to their WordPress hosting requirements.
     28This plugin is primarily aimed at WordPress Webmasters (Site Owners), Developers & Agencies
    3529
    3630#### ROADMAP:
    37 * Beta Testing Phase 1:  Feb 01 - Mar 03, 2020
    38 * Beta Testing Phase 2:  Mar 04 - Jun 04, 2020
    39 * Beta Testing Phase 3:  Jun 05 - Aug 31, 2020
    40 
    4131* v.1.9.1 Release - Jun 05, 2020 [WCEU](https://2020.europe.wordcamp.org/)
    4232
    43 * v.2.0.1 Managed Solution Release: Sep 07, 2020 [Link to AWS Labs](https://aws.amazon.com/getting-started/hands-on/migrating-a-wp-website/)
    44 
    45 * v.2.3.0 Self-Managed Solution Release: Nov 30, 2020 [Link to Self Managed Tutorial](https://www.seahorse-data.com/migrating-and-managing-wordpress-with-amazon-lightsail-self-manage/)
     33* v.2.3.0 v.2 Self-Managed Solution Release: Nov 30, 2020 [Link to Self Managed Tutorial](https://www.seahorse-data.com/migrating-and-managing-wordpress-with-amazon-lightsail-self-manage/)
     34
     35* v.3.2.* v.3 Self-Managed Solution Release: Jun 02, 2022 [WCEU](https://europe.wordcamp.org/2022/)
    4636
    4737== Installation ==
     
    51412. Activate the plugin through the 'Plugins' menu in WordPress
    5242
    53 == Video Guides ==
    54 **WP on AWS** Explainer Video
    55 
    56 https://youtu.be/6OVVGiuTxAg
    57 
    58 How to clone a WordPress site to AWS in 3 minutes
    59 
    60 https://youtu.be/n7NkrhHRFNw
    61 
    62 How to manage AWS hosting from within your WordPress admin console
    63 
    64 https://youtu.be/gR61ufldqng
    65 
    66 
    6743== Changelog ==
     44
     45= 3.1.0 =
     46* feature - #32 updated launch-success view layout & contents
     47* bugfix - #35 switch-off multi-site support
     48* feature - #36 updated configuration for remote manage API
     49* fix - #37 removed check for amazon polly plugin conflict
     50* testing - #38 tested to WordPress version 5.9
     51* fix #41 updates to text, image, and external links on launch screen
    6852
    6953= 3.0.20 =
     
    204188
    205189= adopting admin migration process as default =
     190
     191== Frequently Asked Questions ==
     192
     193= Do I need my own AWS Account? =
     194
     195You do not need an AWS account to run a trial clone. A self-manage licence however requires an AWS account as this is where the instance will be built. Seahorse offers an account creation service for users if required.
     196
     197= Where are Trial clones created? =
     198
     199Trial instances are created in our Seahorse / AWS environment.
     200
     201= Why is there no option to select another Region? =
     202
     203Trials are restricted to the eu-west-1 (Ireland) region only. Users have the option to select any of the Lightsail regions however when using a production licence
     204
     205= Does your software support multisite networks? =
     206
     207No, the software does not currently allow migration or management of WordPress multisite. Multisite support is part of our development roadmap however and will be delivered later in 2021.
     208
     209= For how long are trial clones active? =
     210
     211Trial instances are active for 36 hours after launch.
     212
     213= Can I log into the Trial clone instance and make changes? =
     214
     215No, the trial instance is for front-end review only and access to the WordPress admin of the site is restricted.
     216
     217= What plan level is the Trial instance running on? =
     218
     219Trial instances are launched on the $10 Lightsail plan. More information on plan types can be found here: https://aws.amazon.com/lightsail/pricing/. On production licenses the initial migration is also launched on the $10 plan but users are free from there to scale up/down as they wish
  • wp-migrate-2-aws/trunk/settings.php

    r2636772 r2690043  
    1515            self::client_supported();
    1616            self::fopen_available();
     17            self::isMultisiteInstallation();
    1718            self::zip_archive_available();
    1819            self::zip_archive_disabled();
    19             self::checkAwsforWpPlugin();
    2020            self::checkSimplyStaticPlugin();
    2121           
     
    5959            return $curlExecDisabled;
    6060        }
    61        
     61
     62        /**
     63         * Check if the current site is a multi-site installation & set an error message.
     64         *
     65         * @return bool
     66         */
     67        private static function isMultisiteInstallation()
     68        {
     69            $isMultiSiteInstallation = is_multisite();
     70
     71            if ($isMultiSiteInstallation === true) {
     72                self::$settingsErrors[] = 'We have detected that this site is a multisite installation. WordPress Multisite is not yet supported.';
     73            }
     74
     75            return $isMultiSiteInstallation;
     76        }
     77
     78
     79
    6280        private static function fopen_available() {
    6381            $fopenAllowed = ini_get( 'allow_url_fopen' );
     
    6684            }
    6785            return $fopenAllowed;
    68         }
    69    
    70         private static function checkAwsforWpPlugin() {
    71             $isActive = is_plugin_active( 'amazon-polly/amazonpolly.php' );
    72             if ($isActive === true) {
    73               $pluginData = get_plugin_data( WP_PLUGIN_DIR."/amazon-polly/amazonpolly.php");
    74               if($pluginData['Version'] > '4.2.2') {
    75                 self::$settingsErrors[] = 'AWS for WordPress plugin is active on this site and running a version which coflicts with WP on AWS. Please disable this plugin for the duration of the cloning process.';
    76                 }
    77             }
    78             return $isActive;
    7986        }
    8087
  • wp-migrate-2-aws/trunk/wp-migrate-2-aws.php

    r2636772 r2690043  
    1010Tags: migration, AWS, migrate WordPress, manage AWS
    1111Requires at least: 4.8
    12 Tested up to: 5.7
     12Tested up to: 5.9
    1313Stable tag: 4.8
    1414Domain Path: /languages/
    15 Version: 3.0.20
     15Version: 3.1.0
    1616License: GPLv2 or later
    1717License URI:  https://www.gnu.org/licenses/gpl-2.0.html
     
    2525}
    2626
    27 define('WPM2AWS_VERSION', '3.0.20');
     27define('WPM2AWS_VERSION', '3.1.0');
    2828
    2929define('WPM2AWS_REQUIRED_WP_VERSION', '4.8');
Note: See TracChangeset for help on using the changeset viewer.