Changeset 2865524
- Timestamp:
- 02/15/2023 09:01:27 AM (3 years ago)
- Location:
- wp-migrate-2-aws/trunk
- Files:
-
- 9 edited
-
admin/assets/console-styles.css (modified) (3 diffs)
-
admin/classes/adminMigrate.class.php (modified) (3 diffs)
-
admin/includes/adminMenu/adminMenu.php (modified) (5 diffs)
-
admin/includes/adminPages/adminPagesCommon.php (modified) (4 diffs)
-
admin/includes/adminPages/adminPagesConsole.php (modified) (5 diffs)
-
admin/includes/adminPages/adminPagesGeneral.php (modified) (3 diffs)
-
inc/migration-form-template.php (modified) (1 diff)
-
readme.txt (modified) (5 diffs)
-
wp-migrate-2-aws.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-migrate-2-aws/trunk/admin/assets/console-styles.css
r2736626 r2865524 97 97 .wpm2aws-console-section.wpm2aws-action-buttons .wpm2aws-sub-panel:hover .wpm2aws-action-button-overlay .wpm2aws-action-button-overlay-contents { 98 98 display:block; 99 }100 101 .wpm2aws-console-section.wpm2aws-action-buttons .wpm2aws-sub-panel a {102 display: block;103 padding: 60px 0;104 text-align: center;105 text-decoration: none;106 width: 100%;107 99 } 108 100 … … 175 167 opacity: 0.5; 176 168 cursor: not-allowed; 177 height: 100%;178 169 flex-direction: column; 170 } 171 172 .wpm2aws-console-section-inverse a { 173 text-decoration: none; 179 174 } 180 175 … … 294 289 margin-bottom: 5px; 295 290 text-align: center; 291 } 292 293 .wpm2aws-console-section-inverse { 294 display: block; 295 padding: 60px 0; 296 text-align: center; 297 text-decoration: none; 298 width: 100%; 299 height: 65%; 296 300 } 297 301 -
wp-migrate-2-aws/trunk/admin/classes/adminMigrate.class.php
r2760615 r2865524 172 172 173 173 //Set the Size of AWS Instance 174 wpm2awsAddUpdateOptions('wpm2aws-aws-lightsail-size', WPM2AWS_PLUGIN_AWS_LIGHTSAIL_ SIZE);174 wpm2awsAddUpdateOptions('wpm2aws-aws-lightsail-size', WPM2AWS_PLUGIN_AWS_LIGHTSAIL_DEFAULT_SIZE_NAME); 175 175 176 176 // Set the AWS Region as per Default Region … … 807 807 try { 808 808 $apiRemote = new WPM2AWS_ApiRemote(); 809 } catch (Throwable $e) {810 set_transient('wpm2aws_admin_error_notice_' . get_current_user_id(), $e->getMessage());811 812 wpm2awsWpRedirectAndExit();813 // exit(wp_redirect(admin_url('/admin.php?page=wpm2aws')));814 809 } catch (Exception $e) { 815 810 set_transient('wpm2aws_admin_error_notice_' . get_current_user_id(), $e->getMessage()); … … 823 818 try { 824 819 $instance = $apiRemote->createLightsailFromZip(); 825 } catch (Throwable $e) {826 set_transient('wpm2aws_admin_error_notice_' . get_current_user_id(), $e->getMessage());827 828 wpm2awsWpRedirectAndExit();829 // exit(wp_redirect(admin_url('/admin.php?page=wpm2aws')));830 820 } catch (Exception $e) { 831 821 set_transient('wpm2aws_admin_error_notice_' . get_current_user_id(), $e->getMessage()); -
wp-migrate-2-aws/trunk/admin/includes/adminMenu/adminMenu.php
r2736626 r2865524 96 96 wpm2awsAddUpdateOptions('wpm2aws-redirect-home-name', $menuSlug); 97 97 98 if ($isAvailable === true) { 99 $this->loadIamForm('STAGING'); 100 101 return; 102 } 103 104 $this->loadAwsCreateStaging(); 98 $this->loadAwsCreateStaging($isAvailable); 105 99 } 106 100 ); … … 161 155 echo '</div>'; 162 156 wp_die(); 163 } catch (Throwable $e) {164 $msg = $e->getMessage();165 wp_die("Error: " . $msg);166 157 } 167 158 … … 186 177 echo '</div>'; 187 178 wp_die(); 188 } catch (Throwable $e) {189 $msg = $e->getMessage();190 wp_die("Error: " . $msg);191 179 } 192 180 … … 234 222 echo '</div>'; 235 223 wp_die(); 236 } catch (Throwable $e) {237 $msg = $e->getMessage();238 wp_die("Error: " . $msg);239 224 } 240 225 … … 265 250 266 251 /** 267 * @return void 268 */ 269 public function loadAwsCreateStaging() 270 { 271 WPM2AWS_AdminPagesConsole::loadAwsCreateStagingView(); 252 * @param bool $isAvailable 253 * @return void 254 */ 255 public function loadAwsCreateStaging($isAvailable) 256 { 257 WPM2AWS_AdminPagesConsole::loadAwsCreateStagingView($isAvailable); 272 258 } 273 259 -
wp-migrate-2-aws/trunk/admin/includes/adminPages/adminPagesCommon.php
r2736626 r2865524 77 77 78 78 // Create Staging Block 79 $disabledSectionClass = ''; 79 80 $html .= self::createStagingOnAwsBlock($licenceType, $disabledSectionClass, $noSectionLink, 'left'); 80 81 … … 208 209 * @param $sectionClass 209 210 * @param $sectionLink 210 * 211 * @param $panelPosition 211 212 * @return string 212 213 */ … … 215 216 $createStagingAllowedLicenceTypes = ['self-managed']; 216 217 $offerUpgradeOptionLicenceTypes = ['trial', 'TRIAL', 'single-migration']; 218 $target = ''; 217 219 218 220 // Set action button link if applicable 219 221 if (\in_array($licenceType, $createStagingAllowedLicenceTypes) === true) { 220 $sectionLink = admin_url('/admin.php?page=wpm2aws-create-staging'); 222 $sectionLink = WPM2AWS_SEAHORSE_WEBSITE_URL . '/how-to-quickly-and-easily-create-staging-development-sites-self-manage/'; 223 $target = 'target="_blank"'; 221 224 $sectionClass = ''; 222 225 } … … 234 237 // Add action button link if available 235 238 if ($sectionLink !== false) { 236 $html .= '<a class="wpm2aws-action-button" href="' . $sectionLink . '">';239 $html .= '<a ' . $target . ' class="wpm2aws-action-button" href="' . $sectionLink . '">'; 237 240 } 238 241 239 242 $html .= '<img style="max-width:70px;margin-bottom:15px;" src="' . plugin_dir_url( dirname( dirname( __FILE__ ) ) ) . 'assets/images/staging-icon.png"/><br>'; 240 243 $html .= '<h3>'. esc_html(__('Create Staging', 'migrate-2-aws')) .'</h3>'; 241 $html .= '<p>'. esc_html(__(' This option allows youto create a direct copy (existing stack version) for launching staging/dev sites', 'migrate-2-aws')) .'</p>';244 $html .= '<p>'. esc_html(__('Click this option for our tutorial on how to create a direct copy (existing stack version) for launching staging/dev sites', 'migrate-2-aws')) .'</p>'; 242 245 243 246 if ($sectionLink !== false) { -
wp-migrate-2-aws/trunk/admin/includes/adminPages/adminPagesConsole.php
r2736626 r2865524 171 171 /** 172 172 * Create the view for the "Create Staging" action page. 173 * 173 * @param bool $isAvailable 174 174 * @return void 175 175 */ 176 public static function loadAwsCreateStagingView( )176 public static function loadAwsCreateStagingView($isAvailable) 177 177 { 178 178 self::makePageHeading('STAGING'); 179 180 if ($isAvailable === true) { 181 echo self::makeCreateStagingPage(); 182 183 return; 184 } 179 185 180 186 /* Add admin notice */ … … 184 190 echo "<br>"; 185 191 186 echo self::make CreateStagingPage();192 echo self::makeStagingUnavailablePage(); 187 193 } 188 194 … … 310 316 * @return string 311 317 */ 312 private static function make CreateStagingPage()318 private static function makeStagingUnavailablePage() 313 319 { 314 320 WPM2AWS_WelcomePanel::template(); … … 321 327 322 328 return self::makeFeatureUnavailablePage($overlayText); 329 } 330 331 /** 332 * @return string 333 */ 334 private static function makeCreateStagingPage() 335 { 336 WPM2AWS_WelcomePanel::template(); 337 338 $licenceType = get_option('wpm2aws_valid_licence_type'); 339 $disabledSectionClass = ' wpm2aws-disabled-sections'; 340 $noSectionLink = false; 341 $panelPosition = 'left'; 342 343 $html = ''; 344 345 // Row opener 346 $html .= '<div class="wpm2aws-console-section wpm2aws-action-buttons">'; 347 348 $html .= self::createStagingOnAwsBlock($licenceType, $disabledSectionClass, $noSectionLink, $panelPosition); 349 350 // Row closer 351 $html .= '</div>'; 352 353 return $html; 323 354 } 324 355 … … 513 544 $disabled = 'disabled readonly="readonly"'; 514 545 } 515 $html .= '<option ' . $disabled . ' value="' . esc_attr($dataKey) . '">' . esc_attr($dataVal) . '</option>';546 $html .= '<option ' . $disabled . ' value="' . esc_attr($dataKey) . '">' . esc_attr($dataVal) . '</option>'; 516 547 } 517 548 $html .= '</select>'; -
wp-migrate-2-aws/trunk/admin/includes/adminPages/adminPagesGeneral.php
r2760615 r2865524 326 326 'TRIAL' === strtoupper(get_option('wpm2aws_valid_licence_type')) 327 327 ) { 328 $html .= 'This software launches trial instances in 2GB "Small" plan ($10 p/m) by default.'; 328 $launchTrialInstanceText = \sprintf( 329 'This software launches trial instances in %s "%s" plan by default.', 330 WPM2AWS_PLUGIN_AWS_LIGHTSAIL_DEFAULT_SIZE_GB, 331 WPM2AWS_PLUGIN_AWS_LIGHTSAIL_DEFAULT_SIZE_NAME 332 ); 333 334 $html .= $launchTrialInstanceText; 329 335 } else { 330 $html .= 'This software launches instances in 2GB "Small" plan by default unless otherwise specified above.'; 336 $launchInstanceText = \sprintf( 337 'This software launches trial instances in %s "%s" plan by default unless otherwise specified above.', 338 WPM2AWS_PLUGIN_AWS_LIGHTSAIL_DEFAULT_SIZE_GB, 339 WPM2AWS_PLUGIN_AWS_LIGHTSAIL_DEFAULT_SIZE_NAME 340 ); 341 342 $html .= $launchInstanceText; 331 343 $html .= '</br>'; 332 344 $html .= 'If you wish to continue using this instance type you do not need to carry out the tasks in Step 13 on the User Guide. Increasing the instance size is an option but not a requirement.'; … … 2956 2968 'TRIAL' === strtoupper(get_option('wpm2aws_valid_licence_type')) 2957 2969 ) { 2958 $instanceSizeTitleText = ' Plan Type: ';2959 $instanceSizeText = ' $10 per month';2970 $instanceSizeTitleText = 'Instance Size: '; 2971 $instanceSizeText = ' Default Plan'; 2960 2972 } 2961 2973 2962 2974 echo '<li> <strong>' . $instanceSizeTitleText . '</strong>'; 2963 echo ' <a target="_blank" style="color:#e59335;font-weight:600;" href="https://aws.amazon.com/lightsail/pricing/">' . $instanceSizeText . '</a>';2975 echo ' <a target="_blank" style="color:#e59335;font-weight:600;" href="https://aws.amazon.com/lightsail/pricing/">' . $instanceSizeText . '</a>'; 2964 2976 2965 2977 echo '</li>'; … … 2972 2984 ) { 2973 2985 echo '<h3>Clone to AWS Trial</h3>'; 2974 echo '<p>This temporary site will remain active for review for 36hours after launch at which point it will be shut-down.</p>';2986 echo '<p>This temporary site will remain active for review for ' . WPM2AWS_PLUGIN_AWS_LIGHTSAIL_TRIAL_INSTANCE_AVAILABLE_DURATION_HOURS . ' hours after launch at which point it will be shut-down.</p>'; 2975 2987 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>'; 2976 2988 echo '<p>Would you like to know more? Check out the available options <a target="_blank" href="' . WPM2AWS_SEAHORSE_WEBSITE_URL . '/pricing/">here</a>.</p>'; -
wp-migrate-2-aws/trunk/inc/migration-form-template.php
r2736626 r2865524 260 260 261 261 if ($fieldValue === false || $fieldValue === '') { 262 $fieldValue = WPM2AWS_PLUGIN_AWS_LIGHTSAIL_ SIZE;262 $fieldValue = WPM2AWS_PLUGIN_AWS_LIGHTSAIL_DEFAULT_SIZE_NAME; 263 263 } 264 264 -
wp-migrate-2-aws/trunk/readme.txt
r2816223 r2865524 4 4 Tags: migration, aws, migrate, manage, clone 5 5 Requires at least: 4.8 6 Tested up to: 6.1 6 Tested up to: 6.1.1 7 7 Requires PHP: 5.6 8 8 Stable tag: trunk … … 14 14 Migrate, 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 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.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 6 hours after launch. 17 17 18 18 **AWS Trial User Guide** [Link to AWS Labs](https://aws.amazon.com/getting-started/hands-on/migrating-a-wp-website/) … … 29 29 30 30 #### ROADMAP: 31 * v.1.9.1 Release - Jun 05, 2020 [WCEU](https://2020.europe.wordcamp.org/) 32 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/) 31 * v.2.3.* 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/) 32 33 * v.3.2.* v.3 Self-Managed Solution release: Jun 02, 2022 [WCEU 22](https://europe.wordcamp.org/2022/) 34 35 * v.4.1.* v.4 Self-Managed Solution extended functionality release: Oct 14, 2022 36 37 * v.5.0.* v.5 Self-Managed Solution upgraded media transfer release: Jun 08, 2023 [WCEU 23](https://europe.wordcamp.org/2023/) 36 38 37 39 == Installation == … … 43 45 == Changelog == 44 46 47 = 4.3.0 = 48 * feature - #74 updated default launch instance size 49 * feature - #58 updates to "create staging" functionality 50 45 51 = 4.2.0 = 46 * f aeture - #59 Changed header links according to user type52 * feature - #59 added user specific links to interface 47 53 48 54 = 4.1.1 = … … 231 237 = For how long are trial clones active? = 232 238 233 Trial instances are active for 36 hours after launch.239 Trial instances are active for 6 hours after launch. 234 240 235 241 = Can I log into the Trial clone instance and make changes? = -
wp-migrate-2-aws/trunk/wp-migrate-2-aws.php
r2816223 r2865524 10 10 Tags: migration, AWS, migrate WordPress, manage AWS 11 11 Requires at least: 4.8 12 Tested up to: 6.1 12 Tested up to: 6.1.1 13 13 Stable tag: 4.8 14 14 Domain Path: /languages/ 15 Version: 4. 2.015 Version: 4.3.0 16 16 License: GPLv2 or later 17 17 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 25 25 } 26 26 27 define('WPM2AWS_VERSION', '4. 2.0');27 define('WPM2AWS_VERSION', '4.3.0'); 28 28 29 29 define('WPM2AWS_REQUIRED_WP_VERSION', '4.8'); … … 61 61 define('WPM2AWS_PLUGIN_AWS_REGION', 'eu-west-1'); 62 62 63 // default launch instance size 64 define('WPM2AWS_PLUGIN_AWS_LIGHTSAIL_SIZE', 'Small'); 63 // default launch instance details 64 define('WPM2AWS_PLUGIN_AWS_LIGHTSAIL_DEFAULT_SIZE_NAME', 'Medium'); 65 define('WPM2AWS_PLUGIN_AWS_LIGHTSAIL_DEFAULT_SIZE_GB', '4GB'); 66 67 define('WPM2AWS_PLUGIN_AWS_LIGHTSAIL_TRIAL_INSTANCE_AVAILABLE_DURATION_HOURS', '6'); 65 68 66 69 // default AWS a/c no
Note: See TracChangeset
for help on using the changeset viewer.