Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • There are two steps to achieve, in any order:

    1. Make a custom domain point to MAMP.
      This link contains instructions on updating the hosts file using a text editor, for free.
    2. Let WordPress know you are accessing it through that domain.
      Because MAMP is running on your computer, as opposed to an external server, FileZilla will not be necessary. Instead, use a text editor to open the folder where WordPress is, and then you can make the changes in the Changing The Site URL, so that WordPress knows it is being accessed through the new domain from step 1.

    The file(s) will have to be edited outside of WordPress. The codex has some information on Editing Files to point you in the right direction.

    Often, depending on how you are hosting the site, this will involve downloading that file (functions.php) via FTP, checking and correcting line 27 in a text editor, and then re-uploading the edited file via FTP.

    Forum: Fixing WordPress
    In reply to: Image problems

    I believe the last two issues you mention are due to the size of the images.

    Take a look at Chrome’s built-in DevTools and/or Firebug for Firefox or Chrome and analyze the resources downloaded for each page.

    As an example, the slider on the 2014 Bathrooms page is, by itself, 7.56MB of images. The “jitter” effect is the page loading before the images have loaded – once the image is downloaded it pops onto the page and is then stretched/resized as necessary.

    Take a look at Google’s guide to image optimization and apply some of those concepts to help speed up your website.

    Two quick notes:
    (1) Those banner images should not be PNG (vector) files, they should be JPGs (raster). The Google guide will explain more on this.
    (2) I was recently impressed by kraken.io, which will allow you to optimize your images. (Do this after finding JPGs for the raster images for better results.)

    Maybe Ubuntu Desktop does not allow traffic over port 80 by default, in which case you may need to allow incoming traffic on port 80. From your Ubuntu machine, like so:

    sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
    (Allows all incoming web traffic.)

    1 – Nat, 2 Host-Only.

    My network adapters are configured the same. This looks correct.

    Using MAMP, are you accessing your website using http://localhost or http://127.0.0.1?

    If so, then you can add an alias to your host file defining the URL you would like to use.

    There’s a swanky, paid program called VirtualHostX (with a free trial) that works as a GUI for this.

    Should you go the manual route, the line you might add to the bottom of your hosts file will look something like:

    127.0.0.1    mysite.dev

    ^ This will route all requests for mysite.dev back to MAMP.

    It’s letting you know that there is a syntax error on line 27 of the functions.php file. If it’s not immediately apparent a PHP Code Checker might be useful to help track it down.

    Should you run into trouble locating it, post that line (and maybe a few surrounding ones) here and someone may spot the problem.

    Wrap get_sidebar() with a condition. There’s more information on get_sidebar() in the Codex including an example of something similar to what you want.

    <?php
    if ( is_home() ) :
      get_sidebar();
    endif;
    ?>

    Note: depending on how your home page is set up you may need to check is_front_page() instead of is_home(). So, perhaps you could do something like…

    <?php
    if ( is_home() || is_front_page() ) :
      get_sidebar();
    endif;
    ?>

    It’s set on line 43 of /functions/theme-actions.php:

    <div class="copyright-left-text">Copyright © <?php echo date("Y") ?> <a href="<?php echo home_url(); ?>" title="<?php bloginfo('description'); ?>" rel="nofollow"><?php bloginfo('name'); ?></a>.</div>

    This is your web server telling you that you have an error in the PHP code located in your theme’s functions.php file, an unexpected open bracket ([) on line 17.

    Try using some other means to access this file and review it for errors. This might be editing the file over SSH or replacing it using FTP.

    If I felt hesitance around upgrading I would first test it out in a different environment before doing it on the public facing production instance of WordPress. Migrating (cloning) to a second location is quite simple once you have access to source files and the database. I would still recommend that even if foreign enough to present additional work through learning the tasks – the experience alone will give you a better understanding of WordPress and the technologies that it runs on. (Further detail probably best for another time and comment.)

    As for funky content, there are a bunch of factors that go into this. Which further emphasizes the above paragraph. Questions to ask might be Will any plug-ins break if they aren’t compatible with a newer version? Will vendor CSS files change in a way that might break the presentation of my site’s design? Will functions built into the theme or custom plug-ins of the site break if they were deprecated many versions ago?

    Those questions are best addressed with a combination of research on how the WordPress site is configured, how the theme is built, and what plug-ins are in use.

    Costs – “Remember, that time is money. He that can earn ten shillings a day by his labour, and goes abroad, or sits idle, one half of that day, though he spends but sixpence during his diversion or idleness, ought not to reckon that the only expense; he has really spent, or rather thrown away, five shillings besides” (Franklin 370). Weigh what you will learn with the time you will spend, the clout you will gain, and what you could be doing instead.

    As for down time, you might be able to get around this depending on how you do your upgrade. You might be able to do it on a new instance that you can setup, upgrade, test, and then point your site over to the new location (A → B). Or you might choose to simply test the upgrade on a second location, like a staging or development environment, and then recreate those steps back on your production site (A → B → A). Either way, perhaps something like Cloudflare might help mitigate any downtime through a cache of anything public facing in case your site temporarily goes offline.

    I’m a little confused by what you are attempting to achieve, but this is what I have discovered about Suits. Hopefully there’s something in here that’ll help.

    If you are trying to modify the way an individual post page appears, the template is in the file ‘single.php’. However, Suits calls in the file ‘content.php’ to build the content (title, post, meta information below – including time posted and category).

    A few templates share ‘content.php’, and it builds the layout using conditions. For example, you’ll see an if statement that verifies if the page is_single(), and if so then it only outputs the title as a headline – if not, then it wraps the headline in a link.

    The part that builds the line with the post meta information is down at the bottom, in the <footer> section. It calls a function ‘suits_entry_meta()’. You’ll notice that if you comment out this function, the meta information on the post goes away. However, since other templates share this ‘content.php’ layout, you may not wish to do that if you are looking to move the meta information for posts.

    If you want to view a post and have the meta information under the title, first remove it from the footer but ONLY for single layouts (or else it will disappear on Index layouts, and others).

    You can do this by wrapping line 40 in ‘content.php’ in a conditional similar to on line 18:

    <?php if ( !is_single() ) : ?>
    	<?php suits_entry_meta(); ?>
    <?php endif; ?>

    This tells WordPress to generate that meta information text for every template EXCEPT the single post layout. Then, to relocate that meta information under the title, only on post layouts, you would use the same code as above, just remove the ‘!’. Which means: If this is the single post template then load the meta information here. You could move it under the <header></header> section in ‘content.php’ to make it appear under the title.

    I hope something in here helps, or points you in the right direction.

    When you go through the Famous 5-Minute Install it should auto-generate a wp-config.php file for you.

    If your WordPress application does not have write access to the directory holding wp-config.php then it will not be able to auto-generate and save that file. In this case do what you and OP mentioned: rename the file, edit and manually fill in the configuration, and save it (dropping the ‘-sample’) to the same folder.

Viewing 13 replies - 1 through 13 (of 13 total)