Advertisement
Guest User

Untitled

a guest
Jan 21st, 2016
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.01 KB | None | 0 0
  1. // Setting up New WordPress Website
  2. 1. Log into WPEngine: https://my.wpengine.com/
  3. 2. Add New Install
  4. - Type domain name which will be DOMAINNAME.wpengine.com
  5. - Copy From: wordpressbase
  6. - Duplicate (Includes content)
  7. - Create install
  8. 3. Wait until the install is successfully created (The yellow banner will disappear)
  9. 4. Click on FTP username
  10. - Type in new password to change
  11. - Leave path as blank
  12. - Click save
  13. 5. Click on PHPMyAdmin
  14. - Click on database name with wp_
  15. - Click Browse for the wp_users table
  16. - Edit the username which matches the new domain (not the wpengine one)
  17. - Paste a new password
  18. - Change password dropdown to MD5 for encryption
  19. - Change email from pete@paperstreet.com to blogs@paperstreet.com
  20. - Save
  21. - Exit PHPMyAdmin
  22. 6. Open WordPress admin located at http://DOMAINNAME.wpengine.com/wp-admin/
  23. - Username: wordpressbase
  24. - Password: Created in Step #5
  25. 7. Click on WP Engine tab
  26. - Set "Object/Transient Cache" to Disabled
  27. - Save
  28. 8. Click on Settings > General
  29. - Change Site Title from "Pete Boyd Blog" to the client's name
  30. - Change Tagline from "Your SUPER-powered WP Engine Blog" to a slider tagline
  31. - Change email from pete@paperstreet.com to blogs@paperstreet.com
  32. - Save changes
  33. 9. With new password setup in step #4, connect to the website via FTP
  34. - Host: Server Address found under SFTP logins
  35. - Username: DOMAINNAME in Step #2
  36. - Password: Created in step #4
  37. - Path: /
  38. - Type: SFTP
  39. - Port: 2222
  40. 10. Download the /wp-content/themes/paperstreet/ folder
  41. 11. Delete the Theme Switcher code in header.php which starts on line 54
  42. <?php
  43. // Remove Theme Switcher for your build
  44. include('/nas/wp/www/cluster-10561/wordpressbase/wp-content/themes/theme-switcher.php');
  45. ?>
  46. 12. If you are not building a Plus design ($9,500 level), then delete paperstreet2 and paperstreet3 theme folders
  47.  
  48. // If the wordpressbase theme did not copy
  49. 1. Download the paperstreet theme from WordPress Base
  50. 2. Download the plugins folder from WordPress Base
  51. 3. Log into WordPress Base
  52. - Go to Tools > Export
  53. - Ensure "All Content" is selected
  54. - Click Download Export File
  55. 4. Upload paperstreet theme to new website
  56. - Click on Appearances > Themes
  57. - Activate paperstreet
  58. 5. Upload plugins folder to new website
  59. 6. Log into new website
  60. - Go to Tools > Import
  61. - Click on WordPress
  62. - Click on Install Now
  63. - Click on Activate Plugin and Run Now
  64. - Choose file from step #3
  65. - Click Upload file and import
  66. - Select "wpengine" user for #1
  67. - Select new domain username for #2
  68. - Check "Download and import file attachments"
  69. - Click Submit
  70. 7. Go to Settings > Reading
  71. - Change "Front Page Displays" to "A static page (select below)"
  72. - Change Front Page to "Home Page Headline"
  73. - Change Posts Page to "Blog"
  74. - Change "For each article in a feed, show" to Summary
  75. - Ensure "Discourage search engines from indexing this site" is checked
  76.  
  77. // Double check plugins
  78. 1. Click on Plugins
  79. 2. Delete IJM Theme Switcher Bar
  80. 3. Installs plugins should be:
  81. - Advanced Custom Fields
  82. - Akismet
  83. - Disqus Comment System
  84. - Flexo Archives
  85. - GatherContent Importer (Will remove after using)
  86. - WP Force Lowercase URLs
  87. - WP-PageNavi
  88. - Yoast SEO
  89.  
  90. // Decide which items could use a CPT
  91. - For example, Attorneys and Practice Areas are already setup as CPT
  92. - Whitepapers, videos, podcasts, etc could be other examples
  93.  
  94. // Importing Content
  95. 1. Go to https://paperstreet.gathercontent.com/login
  96. - Login with @paperstreet.com email address. We each have our own account
  97. - Click the icon in the top right and select "Personal Settings"
  98. - Copy the API Key from the "Legacy API" tab
  99. 2. Click on GatherContent in the bottom left
  100. - Enter https://paperstreet.gathercontent.com
  101. - Paste in the API Key from step #3
  102. - Select the website from the list
  103. - Click Import
  104. - On the next page, all content pages should be listed
  105. - Check the box to the far right from of Items title to select all pages
  106. - Click "Configure selected items"
  107. 3. For each page:
  108. - Import as: Page/Attorney/Practice Area
  109. - Import to: New Entry (Home page, attorneys landing, etc can be selected for those pages)
  110. - Parent: None or Parent Being Imported
  111. - Status: Published
  112. - For multiple children, can select "Repeat this configuration"
  113. 4. When you're done, click Import
  114. - Popup box stating "Importing items and text content" will show progress
  115. 5. Go to Plugins and delete GatherContent Importer
  116.  
  117. // Transferring Content
  118. 1. Pages > Add New
  119. - Or Attorneys > Add New
  120. - Or Practice Areas > Add New
  121. 2. Copy the body content
  122. - Possibly format some content with h2, h3, bold paragraph, ordered list, unordered list
  123. - Try not to have extra spaces at the end of a sentence or empty paragraphs
  124. 3. Copy the title tag to the Yoast SEO field
  125. 4. Copy the meta description to the Yoast SEO field
  126. 5. Click Publish
  127. 6. Add the old link and new link to an Excel file with columns titled "OLD" and "NEW"
  128.  
  129. // Structuring Content
  130. 1. Delete testing content
  131. - Posts: Test Post #1-5 and Hello World!
  132. - Pages: Examples and its children
  133. - Attorneys: Peter Boyd, John Doe, Jane Doe
  134. - Practice Areas: Employment Law, Copyright Law, Maritime Injury Personal Injury and all their children
  135. - Click on Trash
  136. - Click on Empty Trash button to permanently remove all pages
  137. 2. Click Screen Options
  138. - Change "Number of items per page" to 50. This will reduce the pagination. If needed, bump to 100 to fit on one page.
  139. 2. Log back into GatherContent via https://paperstreet.gathercontent.com/login
  140. - Double check content for notes, order
  141. 3. Using the Quick Edit option, put the pages in order according to GatherContent
  142. - Next to "Order", put 1 for the first page, 2 for the second and so forth
  143. - Subpages can restart at 1
  144. - For example: Home (1), About (2), Attorneys (3), Practice Areas (4), Blog (5), Contact (6), Confirmation (7), Sitemap (8), Disclaimer (9)
  145. - Do the same for Attorneys and Practice Areas CPT as well
  146. - When you refresh, the pages will show in the correct order now
  147. 4. If you imported the Home Page into "Home Page Headline", go to that page and edit the title
  148. - Same for About, Attorneys, Practices, Legal
  149. 5. Add links to content
  150. - Highlight text
  151. - Click chainlink tool
  152. - Click "Or link to existing content"
  153. - Type in page name
  154. - After finding the page, click it so the URL changes
  155. - Delete the front portion of the URL, such as "http://tlgattorneys.wpengine.com" leaving the forward slash
  156. - Click Add Link
  157. - Repeat for each link
  158. 6. Copy the title tag to the Yoast SEO field
  159. 7. Copy the meta description to the Yoast SEO field
  160. 8. Click Update to save
  161.  
  162. // Add the Menu
  163. 1. Go to Appearance > Menus
  164. 2. Ensure Main Navigation (Primary Menu) is selected at the top
  165. 3. Match the menu exactly to the PSD
  166. - If the PSD includes a dropdown, add the children.
  167. - Add the subpages in the order according to GatherContent, which is the same as the menu order now after updating in the last section
  168. 4. Click Save menu
  169.  
  170. // Permalniks
  171. 1. Go to Settings > Permalinks
  172. 2. Select Custom Structure and add /blog/%postname%/
  173. - If the website uses News & Resources, change /blog/ to /news-resources/
  174. - Always match the blog slug
  175. 3. Click Save Changes
  176. 4. For Custom Post Types, the added static text (in the form of the blog slug) in front of the %postname% wildcard causes problems
  177. - For this reason, we have to ensure our CPTs in /wp-content/themes/paperstreet/functions.php use the with_front attribute
  178. - The following two lines of code:
  179. $rewrites = array('with_front' => false); <-- THIS LINE
  180. register_post_type('attorneys',
  181. array(
  182. 'labels' => $labels,
  183. 'public' => true,
  184. 'supports' => $supports,
  185. 'hierarchical' => true,
  186. 'show_in_nav_menus' => true,
  187. 'rewrite' => $rewrites <-- THIS LINE
  188. )
  189. );
  190.  
  191. // Copying Over Slice Files
  192. 1. If you haven't already, download the /wp-content/themes/paperstreet/ folder
  193. 2. Unzip and open the Slice folder
  194. 2. Within the CSS folder of the paperstreet theme
  195. - Open compressed.css
  196. - Open slice/assets/dist/css/foundation.css
  197. - Find meta.foundation-version {font-family: "/5.5.3/";} at the top
  198. - WordPress Base is currently on version 5.5.2
  199. - If newer, copy and paste the foundation.min.css file in compressed.css, ovewriting the older version of Foundation
  200. - If there are other CSS scripts, such as for jQuery scripts, add them to compressed.css above /* Style */
  201. - Open style.css
  202. - Change the name at the top from "WordPress Base" to the firm name
  203. - Open slice/assets/dist/css/main.css (The main stylesheet with all the custom classes, could be called screen.css)
  204. - Overwrite the style.css contents with main.css
  205. - For your reference, you can copy the original contents of style.css into a new file
  206. - At this point, I like to compress the entire style.css file by hand so all rules are on one line.
  207. This takes time, but it's 100% worth it in my opinion. I also add comments to break up the sections and understand the code.
  208. Since I didn't write the code, it's good to go over it and at least understand it.
  209. For example: http://tlgattorneys.wpengine.com/wp-content/themes/paperstreet/css/style.css
  210. - Upload compresses.css and style.css
  211. 3. Within the JS folder of the paperstreet theme
  212. - Open compressed.js
  213. - Open slice/assets/dist/js/jquery.js
  214. - Find the version number at the top
  215. - WordPress Base is currently on version 1.11.3
  216. - If newer, copy and paste the jquery.min.js file in compressed.js, overwriting the older version of jQuery
  217. - Open slice/assets/dist/js/foundation.js
  218. - Search for the version number, which looks like this - version : '5.3.1',
  219. - WordPress Base is currently on version 5.5.2
  220. - If newer, copy and paste teh foundation.min.js file in compressed.js, ovewriting the older version of Foundation
  221. - If there are other JS scripts, add them to compresses.js above /* Custom */
  222. - The other JS scripts may be located in main.js at the top, in which case, please move them
  223. - A popular one is Modernizr which adds CSS classes for deprecated browsers
  224. - Open custom.js
  225. - Open slice/assets/dist/js/main.js
  226. - Copy and paste the remaining custom jQuery code to custom.js (Start at // Custom functions and do not overwrite top items)
  227. - Upload compressed.js and custom.js
  228. 4. Within the images folder of the paperstreet theme
  229. - Copy the entire images folder from the slice
  230. - Overwrite logo.png
  231. - Upload folder contents
  232.  
  233. // Applying Templates
  234. 1. Open header.php
  235. - Scroll down to right below <body <?php body_class(); ?>>
  236. - Copy and paste the <header> area from the slice to the PHP file
  237. - wp_nav_menu(array('theme_location' => 'primary')); will go in place of the static <ul> menu
  238. - The if(!is_front_page()) block of code targets all subpages, primarly used for featured image banner areas
  239. - Upload header.php
  240. 2. Open footer.php
  241. - Compare the footer area of the subpages in case there are additional areas above the <footer> tag which repeat
  242. - Copy and paste the <footer> area from the slice to the PHP file
  243. - Add &copy; <?php echo date('Y'); ?> in place of static text
  244. - Add <a href="http://www.paperstreet.com" target="_blank">A PaperStreet Web Design</a> in to link back to our site
  245. - Add links to disclaimer, sitemap and privacy policy
  246. - Leave the bottom section with script and wp_footer alone
  247. - Upload footer.php
  248. 3. Open template-home.php
  249. - Open the homepage HTML file (For example: slice/screen_5.html)
  250. - Copy the HTML code between <header> and <footer>
  251. - Paste between the get_header and get_footer PHP functions
  252. - Use <?php echo get_template_directory_uri(); ?>/ for the image filepath.
  253. For example: <img src="<?php echo get_template_directory_uri(); ?>/images/s1.jpg" />
  254. - Replace the static homepage text with:
  255. <h1><?php the_title(); ?></h1>
  256. <?php the_content(); ?>
  257. - Upload template-home.php
  258. 4. Open page.php
  259. - This template is for two-column (content and sidebar) pages that do not fit in the other templates. For example, the sitemap, disclaimer and about.
  260. - Delete the // Coding examples code block
  261. - Also delete the // Functions code block
  262. - If the contact form is not using a two-column template, delete the // Contact code block
  263. - If the practice areas template is not using a two-column template, delete the // Practice Areas code block
  264. - Open the practice detail sliced file. In most cases, this template fits the two-column description also.
  265. - Copy and paste the opening and close <div> containers for the content column and sidebar column
  266. - Then, copy and paste the HTML code between these tags. For the sidebar, this usually includes <div class="widget"> to go along with the page lists. A contact form is usually in the sidebar also. For the content column, start with the code around the <h1> title and then move down to the content area. WordPress press the_title and the_content are used to print the actual text.
  267. - Upload page.php
  268. 5. Open template-wide.php
  269. - This template is for pages take up the full-width of the content area. The attorney landing, practice landing and contact pages usually fit this description. If the attorney landing requires a search, use a custom template such as template-attorneys.php
  270. - Compare the HTML code for these three files. Copy the outside container <div> that all pages have in common. Maybe be multiple containers such as <div class="container"> and <div class="row">
  271. - Paste the outside container below get_header and above the while loop.
  272. In place of <div class="main"><div class="row">
  273. Add or subtract the </div> containers at the bottom of page.php
  274. - Go the practices landing template
  275. - Copy the HTML code between the container <div> classes previously added
  276. - Paste between if statement for Practice Areas:
  277. if(get_the_id() == 7)
  278.  
  279. 5. Open single-attorneys.php
  280. - As the name states, this file is the detail page for the attorneys CPT
  281. -
  282. 6. Open single-practices.php
  283. - As the name states, this file is the detail page for the practices CPT
  284.  
  285.  
  286. 4. Open page.php
  287. - Delete the // Coding examples code block1
  288. - Also delete the // Functions code block
  289.  
  290.  
  291. 5. Open single-attorneys.php
  292. - As the name states, this file is the detail page for the attorneys CPT
  293. -
  294. 6. Open single-practices.php
  295. - As the name states, this file is the detail page for the practices CPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement